diff options
Diffstat (limited to 'tests')
58 files changed, 1115 insertions, 1110 deletions
diff --git a/tests/basic/002.phpt b/tests/basic/002.phpt index e9330c8bf..25dc51303 100644 --- a/tests/basic/002.phpt +++ b/tests/basic/002.phpt @@ -1,7 +1,5 @@ --TEST-- Simple POST Method test ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> --POST-- a=Hello+World --FILE-- diff --git a/tests/basic/003.phpt b/tests/basic/003.phpt index ae6603f44..43d3be1d9 100644 --- a/tests/basic/003.phpt +++ b/tests/basic/003.phpt @@ -1,7 +1,5 @@ --TEST-- GET and POST Method combined ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> --POST-- a=Hello+World --GET-- diff --git a/tests/basic/004.phpt b/tests/basic/004.phpt index 86bf43186..c381e5009 100644 --- a/tests/basic/004.phpt +++ b/tests/basic/004.phpt @@ -1,7 +1,5 @@ --TEST-- Two variables in POST data ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> --POST-- a=Hello+World&b=Hello+Again+World --FILE-- diff --git a/tests/basic/005.phpt b/tests/basic/005.phpt index aa1d19982..742e0ca4b 100644 --- a/tests/basic/005.phpt +++ b/tests/basic/005.phpt @@ -1,7 +1,5 @@ --TEST-- Three variables in POST data ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> --POST-- a=Hello+World&b=Hello+Again+World&c=1 --FILE-- diff --git a/tests/basic/011.phpt b/tests/basic/011.phpt index 34eed7915..2ec7a6ed1 100644 --- a/tests/basic/011.phpt +++ b/tests/basic/011.phpt @@ -1,7 +1,5 @@ --TEST-- Testing $argc and $argv handling (GET) ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> --INI-- register_argc_argv=1 --GET-- diff --git a/tests/basic/013.phpt b/tests/basic/013.phpt index a4155dcf6..376cc06dd 100644 --- a/tests/basic/013.phpt +++ b/tests/basic/013.phpt @@ -1,7 +1,5 @@ --TEST-- POST Method test and arrays ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> --POST-- a[]=1 --FILE-- diff --git a/tests/basic/014.phpt b/tests/basic/014.phpt index 9b7e59f98..7288c44a9 100644 --- a/tests/basic/014.phpt +++ b/tests/basic/014.phpt @@ -1,7 +1,5 @@ --TEST-- POST Method test and arrays - 2 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> --POST-- a[]=1&a[]=1 --FILE-- diff --git a/tests/basic/015.phpt b/tests/basic/015.phpt index b297265bb..eecbaf130 100644 --- a/tests/basic/015.phpt +++ b/tests/basic/015.phpt @@ -1,7 +1,5 @@ --TEST-- POST Method test and arrays - 3 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> --POST-- a[]=1&a[0]=5 --FILE-- diff --git a/tests/basic/016.phpt b/tests/basic/016.phpt index 277253168..b34fd1b1d 100644 --- a/tests/basic/016.phpt +++ b/tests/basic/016.phpt @@ -1,7 +1,5 @@ --TEST-- POST Method test and arrays - 4 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> --POST-- a[a]=1&a[b]=3 --FILE-- diff --git a/tests/basic/017.phpt b/tests/basic/017.phpt index 69424caa6..d514726d1 100644 --- a/tests/basic/017.phpt +++ b/tests/basic/017.phpt @@ -1,7 +1,5 @@ --TEST-- POST Method test and arrays - 5 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> --POST-- a[]=1&a[a]=1&a[b]=3 --FILE-- diff --git a/tests/basic/018.phpt b/tests/basic/018.phpt index 5cae5e8a6..45996b2fe 100644 --- a/tests/basic/018.phpt +++ b/tests/basic/018.phpt @@ -1,7 +1,5 @@ --TEST-- POST Method test and arrays - 6 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> --POST-- a[][]=1&a[][]=3&b[a][b][c]=1&b[a][b][d]=1 --FILE-- diff --git a/tests/basic/019.phpt b/tests/basic/019.phpt index 467d4e6bf..3bece247a 100644 --- a/tests/basic/019.phpt +++ b/tests/basic/019.phpt @@ -1,7 +1,5 @@ --TEST-- POST Method test and arrays - 7 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> --POST-- a[]=1&a[]]=3&a[[]=4 --FILE-- diff --git a/tests/basic/020.phpt b/tests/basic/020.phpt index 0d4704e7f..c94a60407 100644 --- a/tests/basic/020.phpt +++ b/tests/basic/020.phpt @@ -1,7 +1,5 @@ --TEST-- POST Method test and arrays - 8 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> --POST-- a[a[]]=1&a[b[]]=3 --FILE-- diff --git a/tests/basic/021.phpt b/tests/basic/021.phpt index 3010a1b62..bce6bb3c9 100644 --- a/tests/basic/021.phpt +++ b/tests/basic/021.phpt @@ -2,8 +2,6 @@ Bug #37276 (problems witch $_POST array) --INI-- file_upload=1 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 diff --git a/tests/basic/024.phpt b/tests/basic/024.phpt index c3336c7ce..847eeac82 100644 --- a/tests/basic/024.phpt +++ b/tests/basic/024.phpt @@ -3,8 +3,6 @@ Test HTTP_RAW_POST_DATA creation --INI-- magic_quotes_gpc=0 always_populate_raw_post_data=1 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> --POST-- a=ABC&y=XYZ&c[]=1&c[]=2&c[a]=3 --FILE-- diff --git a/tests/basic/025.phpt b/tests/basic/025.phpt index fea9468b4..bafcac809 100644 --- a/tests/basic/025.phpt +++ b/tests/basic/025.phpt @@ -4,8 +4,6 @@ Test HTTP_RAW_POST_DATA with excessive post length magic_quotes_gpc=0 always_populate_raw_post_data=1 post_max_size=1K ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> --POST-- a=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa --FILE-- diff --git a/tests/basic/026.phpt b/tests/basic/026.phpt index 78a18a475..957aa1972 100644 --- a/tests/basic/026.phpt +++ b/tests/basic/026.phpt @@ -3,8 +3,6 @@ Registration of HTTP_RAW_POST_DATA due to unknown content-type --INI-- magic_quotes_gpc=0 always_populate_raw_post_data=0 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> --POST_RAW-- Content-Type: unknown/type a=1&b=ZYX @@ -15,4 +13,4 @@ var_dump($_POST, $HTTP_RAW_POST_DATA); --EXPECT-- array(0) { } -string(9) "a=1&b=ZYX"
\ No newline at end of file +string(9) "a=1&b=ZYX" diff --git a/tests/basic/027.phpt b/tests/basic/027.phpt index 248507b29..ae5d78d50 100644 --- a/tests/basic/027.phpt +++ b/tests/basic/027.phpt @@ -7,8 +7,6 @@ display_errors=0 max_input_nesting_level=10 track_errors=1 log_errors=0 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> --POST-- a=1&b=ZYX&c[][][][][][][][][][][][][][][][][][][][][][]=123&d=123&e[][]][]=3 --FILE-- diff --git a/tests/basic/bug45986.phpt b/tests/basic/bug45986.phpt new file mode 100644 index 000000000..5745d272c --- /dev/null +++ b/tests/basic/bug45986.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #45986 (wrong error messag for a non existant file on rename) +--CREDITS-- +Sebastian Schürmann +sebs@php.net +Testfest 2009 Munich +--FILE-- +<?php +rename('foo', 'bar'); +?> +--EXPECTREGEX-- +.*No such.* diff --git a/tests/basic/bug46759.phpt b/tests/basic/bug46759.phpt index fdbd59554..c5db2b9bb 100644 --- a/tests/basic/bug46759.phpt +++ b/tests/basic/bug46759.phpt @@ -1,7 +1,5 @@ --TEST-- Testing magic_quotes_gpc ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> --INI-- magic_quotes_gpc=1 --GET-- diff --git a/tests/basic/php_egg_logo_guid.phpt b/tests/basic/php_egg_logo_guid.phpt new file mode 100644 index 000000000..b3c5d7bdf --- /dev/null +++ b/tests/basic/php_egg_logo_guid.phpt @@ -0,0 +1,13 @@ +--TEST-- +Testing php_egg_logo_guid() function +--FILE-- +<?php +echo php_egg_logo_guid(); +?> +--EXPECT-- +PHPE9568F36-D428-11d2-A769-00AA001ACF42 + +--CREDITS-- +Jason Easter <easter@phpug-wuerzburg.de> +PHPUG Würzburg <phpug-wuerzburg.de> +Testfest 2009 2009-06-20
\ No newline at end of file diff --git a/tests/basic/php_logo_guid.phpt b/tests/basic/php_logo_guid.phpt new file mode 100644 index 000000000..b5724a96a --- /dev/null +++ b/tests/basic/php_logo_guid.phpt @@ -0,0 +1,10 @@ +--TEST-- +Testing php_logo_guid() function +--FILE-- +<?php +echo php_logo_guid(); +?> +--EXPECT-- +PHPE9568F34-D428-11d2-A769-00AA001ACF42 +--CREDITS-- +Testfest 2009 2009-06-20
\ No newline at end of file diff --git a/tests/basic/php_real_logo_guid.phpt b/tests/basic/php_real_logo_guid.phpt new file mode 100644 index 000000000..2b9003a35 --- /dev/null +++ b/tests/basic/php_real_logo_guid.phpt @@ -0,0 +1,12 @@ +--TEST-- +Testing php_real_logo_guid() function +--FILE-- +<?php +echo php_real_logo_guid(); +?> +--EXPECT-- +PHPE9568F34-D428-11d2-A769-00AA001ACF42 +--CREDITS-- +Jason Easter <easter@phpug-wuerzburg.de> +PHPUG Würzburg <phpug-wuerzburg.de> +Testfest 2009 2009-06-20
\ No newline at end of file diff --git a/tests/basic/rfc1867_anonymous_upload.phpt b/tests/basic/rfc1867_anonymous_upload.phpt index 0f58014a4..8a27e2e37 100644 --- a/tests/basic/rfc1867_anonymous_upload.phpt +++ b/tests/basic/rfc1867_anonymous_upload.phpt @@ -5,8 +5,6 @@ file_uploads=1 error_reporting=E_ALL&~E_NOTICE comment=debug builds show some additional E_NOTICE errors upload_max_filesize=1024 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 diff --git a/tests/basic/rfc1867_array_upload.phpt b/tests/basic/rfc1867_array_upload.phpt index 7af670006..0b762c209 100644 --- a/tests/basic/rfc1867_array_upload.phpt +++ b/tests/basic/rfc1867_array_upload.phpt @@ -5,8 +5,6 @@ file_uploads=1 error_reporting=E_ALL&~E_NOTICE comment=debug builds show some additional E_NOTICE errors upload_max_filesize=1024 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 diff --git a/tests/basic/rfc1867_boundary_1.phpt b/tests/basic/rfc1867_boundary_1.phpt index 35fe3a3f6..fe0a9f2f4 100644 --- a/tests/basic/rfc1867_boundary_1.phpt +++ b/tests/basic/rfc1867_boundary_1.phpt @@ -4,8 +4,6 @@ rfc1867 boundary 1 post_max_size=1024 error_reporting=E_ALL&~E_NOTICE comment=debug builds show some additional E_NOTICE errors ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> --POST_RAW-- Content-Type: multipart/form-data; boundary="------------------------------------foobar" --------------------------------------foobar diff --git a/tests/basic/rfc1867_boundary_2.phpt b/tests/basic/rfc1867_boundary_2.phpt index 575853bb6..256ec4bf7 100644 --- a/tests/basic/rfc1867_boundary_2.phpt +++ b/tests/basic/rfc1867_boundary_2.phpt @@ -4,8 +4,6 @@ rfc1867 boundary 2 post_max_size=1024 error_reporting=E_ALL&~E_NOTICE comment=debug builds show some additional E_NOTICE errors ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> --POST_RAW-- Content-Type: multipart/form-data; boundary=------------------------------------foo, bar --------------------------------------foo diff --git a/tests/basic/rfc1867_empty_upload.phpt b/tests/basic/rfc1867_empty_upload.phpt index 10ed419d4..12ab0fdf0 100644 --- a/tests/basic/rfc1867_empty_upload.phpt +++ b/tests/basic/rfc1867_empty_upload.phpt @@ -5,8 +5,6 @@ file_uploads=1 error_reporting=E_ALL&~E_NOTICE comment=debug builds show some additional E_NOTICE errors upload_max_filesize=1024 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 diff --git a/tests/basic/rfc1867_file_upload_disabled.phpt b/tests/basic/rfc1867_file_upload_disabled.phpt index a0d5271d9..99dee9b83 100644 --- a/tests/basic/rfc1867_file_upload_disabled.phpt +++ b/tests/basic/rfc1867_file_upload_disabled.phpt @@ -4,8 +4,6 @@ rfc1867 file_upload disabled file_uploads=0 error_reporting=E_ALL&~E_NOTICE comment=debug builds show some additional E_NOTICE errors ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 diff --git a/tests/basic/rfc1867_garbled_mime_headers.phpt b/tests/basic/rfc1867_garbled_mime_headers.phpt index 9bee926d9..4010f22ca 100644 --- a/tests/basic/rfc1867_garbled_mime_headers.phpt +++ b/tests/basic/rfc1867_garbled_mime_headers.phpt @@ -5,8 +5,6 @@ file_uploads=1 error_reporting=E_ALL&~E_NOTICE comment=debug builds show some additional E_NOTICE errors upload_max_filesize=1024 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 diff --git a/tests/basic/rfc1867_invalid_boundary.phpt b/tests/basic/rfc1867_invalid_boundary.phpt index 3c6639016..cb27675a0 100644 --- a/tests/basic/rfc1867_invalid_boundary.phpt +++ b/tests/basic/rfc1867_invalid_boundary.phpt @@ -4,8 +4,6 @@ rfc1867 invalid boundary post_max_size=1024 error_reporting=E_ALL&~E_NOTICE comment=debug builds show some additional E_NOTICE errors ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> --POST_RAW-- Content-Type: multipart/form-data; boundary="foobar -----------------------------20896060251896012921717172737 diff --git a/tests/basic/rfc1867_malicious_input.phpt b/tests/basic/rfc1867_malicious_input.phpt index 74c7ad0f7..40b43d277 100644 --- a/tests/basic/rfc1867_malicious_input.phpt +++ b/tests/basic/rfc1867_malicious_input.phpt @@ -5,8 +5,6 @@ file_uploads=1 error_reporting=E_ALL&~E_NOTICE comment=debug builds show some additional E_NOTICE errors upload_max_filesize=1024 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 diff --git a/tests/basic/rfc1867_max_file_size.phpt b/tests/basic/rfc1867_max_file_size.phpt index 0671dc5f0..fa7876fd1 100644 --- a/tests/basic/rfc1867_max_file_size.phpt +++ b/tests/basic/rfc1867_max_file_size.phpt @@ -5,8 +5,6 @@ file_uploads=1 error_reporting=E_ALL&~E_NOTICE comment=debug builds show some additional E_NOTICE errors upload_max_filesize=1024 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 diff --git a/tests/basic/rfc1867_missing_boundary.phpt b/tests/basic/rfc1867_missing_boundary.phpt index 9c8726cd6..6218b135f 100644 --- a/tests/basic/rfc1867_missing_boundary.phpt +++ b/tests/basic/rfc1867_missing_boundary.phpt @@ -4,8 +4,6 @@ rfc1867 missing boundary post_max_size=1024 error_reporting=E_ALL&~E_NOTICE comment=debug builds show some additional E_NOTICE errors ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> --POST_RAW-- Content-Type: multipart/form-data -----------------------------20896060251896012921717172737 diff --git a/tests/basic/rfc1867_missing_boundary_2.phpt b/tests/basic/rfc1867_missing_boundary_2.phpt index cace44383..a8f38ae53 100644 --- a/tests/basic/rfc1867_missing_boundary_2.phpt +++ b/tests/basic/rfc1867_missing_boundary_2.phpt @@ -5,8 +5,6 @@ file_uploads=1 error_reporting=E_ALL&~E_NOTICE comment=debug builds show some additional E_NOTICE errors upload_max_filesize=1024 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 diff --git a/tests/basic/rfc1867_post_max_filesize.phpt b/tests/basic/rfc1867_post_max_filesize.phpt index 4276d496b..62be6c299 100644 --- a/tests/basic/rfc1867_post_max_filesize.phpt +++ b/tests/basic/rfc1867_post_max_filesize.phpt @@ -5,8 +5,6 @@ file_uploads=1 error_reporting=E_ALL&~E_NOTICE comment=debug builds show some additional E_NOTICE errors upload_max_filesize=1 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 diff --git a/tests/basic/rfc1867_post_max_size.phpt b/tests/basic/rfc1867_post_max_size.phpt index 5e40ccaf4..92281351d 100644 --- a/tests/basic/rfc1867_post_max_size.phpt +++ b/tests/basic/rfc1867_post_max_size.phpt @@ -4,8 +4,6 @@ rfc1867 post_max_size post_max_size=1 error_reporting=E_ALL&~E_NOTICE comment=debug builds show some additional E_NOTICE errors ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 diff --git a/tests/basic/zend_logo_guid.phpt b/tests/basic/zend_logo_guid.phpt new file mode 100644 index 000000000..23ca0165a --- /dev/null +++ b/tests/basic/zend_logo_guid.phpt @@ -0,0 +1,13 @@ +--TEST-- +Testing zend_logo_guid() function +--FILE-- +<?php +echo zend_logo_guid(); +?> +--EXPECT-- +PHPE9568F35-D428-11d2-A769-00AA001ACF42 + +--CREDITS-- +Jason Easter <easter@phpug-wuerzburg.de> +PHPUG Würzburg <phpug-wuerzburg.de> +Testfest 2009 2009-06-20
\ No newline at end of file diff --git a/tests/classes/arrayobject_001.phpt b/tests/classes/arrayobject_001.phpt index 51208f8c6..b75f8c7ab 100644 --- a/tests/classes/arrayobject_001.phpt +++ b/tests/classes/arrayobject_001.phpt @@ -1,6 +1,5 @@ --TEST-- Ensure that ArrayObject acts like an array ---SKIPIF-- --FILE-- <?php diff --git a/tests/classes/autoload_derived.p5c b/tests/classes/autoload_derived.p5c index a24c6f932..93a4b3579 100755 --- a/tests/classes/autoload_derived.p5c +++ b/tests/classes/autoload_derived.p5c @@ -1,6 +1,6 @@ -<?php
-
-class autoload_derived extends autoload_root {
-}
-
+<?php + +class autoload_derived extends autoload_root { +} + ?>
\ No newline at end of file diff --git a/tests/classes/autoload_implements.p5c b/tests/classes/autoload_implements.p5c index 66c8f7e53..2c3479c86 100755 --- a/tests/classes/autoload_implements.p5c +++ b/tests/classes/autoload_implements.p5c @@ -1,10 +1,10 @@ -<?php
-
-class autoload_implements implements autoload_interface {
- function testFunction()
- {
- return true;
- }
-}
-
+<?php + +class autoload_implements implements autoload_interface { + function testFunction() + { + return true; + } +} + ?>
\ No newline at end of file diff --git a/tests/classes/autoload_interface.p5c b/tests/classes/autoload_interface.p5c index 3f9a4e70a..6908155e6 100755 --- a/tests/classes/autoload_interface.p5c +++ b/tests/classes/autoload_interface.p5c @@ -1,7 +1,7 @@ -<?php
-
-interface autoload_interface {
- function testFunction();
-}
-
+<?php + +interface autoload_interface { + function testFunction(); +} + ?>
\ No newline at end of file diff --git a/tests/classes/autoload_root.p5c b/tests/classes/autoload_root.p5c index ab0283851..9559d36d3 100755 --- a/tests/classes/autoload_root.p5c +++ b/tests/classes/autoload_root.p5c @@ -1,10 +1,10 @@ -<?php
-
-class autoload_root {
- function testFunction()
- {
- return true;
- }
-}
-
+<?php + +class autoload_root { + function testFunction() + { + return true; + } +} + ?>
\ No newline at end of file diff --git a/tests/lang/bug24054.phpt b/tests/lang/bug24054.phpt index 3c9d74620..9f027e426 100644 --- a/tests/lang/bug24054.phpt +++ b/tests/lang/bug24054.phpt @@ -1,7 +1,7 @@ --TEST-- Bug #24054 (Assignment operator *= broken) --FILE-- -<?php // $Id: bug24054.phpt,v 1.3 2003/09/13 19:49:50 abies Exp $ +<?php // $Id: bug24054.phpt 140237 2003-09-13 19:49:50Z abies $ define('LONG_MAX', is_int(5000000000)? 9223372036854775807 : 0x7FFFFFFF); define('LONG_MIN', -LONG_MAX - 1); diff --git a/tests/lang/bug25145.phpt b/tests/lang/bug25145.phpt index e33580ab0..9c533871a 100755 --- a/tests/lang/bug25145.phpt +++ b/tests/lang/bug25145.phpt @@ -1,7 +1,5 @@ --TEST-- Bug #25145 (SEGV on recpt of form input with name like "123[]") ---SKIPIF-- -<?php if (php_sapi_name() == 'cli') echo 'skip'; ?> --GET-- 123[]=SEGV --FILE-- diff --git a/tests/lang/bug38579.inc b/tests/lang/bug38579.inc index f822e6d84..8ecc55824 100755 --- a/tests/lang/bug38579.inc +++ b/tests/lang/bug38579.inc @@ -1,3 +1,3 @@ -<?php
-echo "ok\n";
-?>
+<?php +echo "ok\n"; +?> diff --git a/tests/lang/bug44827.phpt b/tests/lang/bug44827.phpt new file mode 100644 index 000000000..38e1d4569 --- /dev/null +++ b/tests/lang/bug44827.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #44827 (Class error when trying to access :: as constant) +--CREDITS-- +Sebastian Schürmann +sebs@php.net +Testfest Munich 2009 +--FILE-- +<?php +define('::', true); +var_dump(constant('::')); +?> +--EXPECTREGEX-- +.*Fatal.* + diff --git a/tests/lang/engine_assignExecutionOrder_001.phpt b/tests/lang/engine_assignExecutionOrder_001.phpt index 4507e8b28..1b85cb7e6 100644 --- a/tests/lang/engine_assignExecutionOrder_001.phpt +++ b/tests/lang/engine_assignExecutionOrder_001.phpt @@ -1,152 +1,152 @@ ---TEST--
-Evaluation order during assignments.
---FILE--
-<?php
-
-function f() {
- echo "in f()\n";
- return "name";
-}
-
-function g() {
- echo "in g()\n";
- return "assigned value";
-}
-
-
-echo "\n\nOrder with local assignment:\n";
-${f()} = g();
-var_dump($name);
-
-echo "\n\nOrder with array assignment:\n";
-$a[f()] = g();
-var_dump($a);
-
-echo "\n\nOrder with object property assignment:\n";
-$oa = new stdClass;
-$oa->${f()} = g();
-var_dump($oa);
-
-echo "\n\nOrder with nested object property assignment:\n";
-$ob = new stdClass;
-$ob->o1 = new stdClass;
-$ob->o1->o2 = new stdClass;
-$ob->o1->o2->${f()} = g();
-var_dump($ob);
-
-echo "\n\nOrder with dim_list property assignment:\n";
-$oc = new stdClass;
-$oc->a[${f()}] = g();
-var_dump($oc);
-
-
-class C {
- public static $name = "original";
- public static $a = array();
- public static $string = "hello";
-}
-echo "\n\nOrder with static property assignment:\n";
-C::${f()} = g();
-var_dump(C::$name);
-
-echo "\n\nOrder with static array property assignment:\n";
-C::$a[f()] = g();
-var_dump(C::$a);
-
-echo "\n\nOrder with indexed string assignment:\n";
-$string = "hello";
-function getOffset() {
- echo "in getOffset()\n";
- return 0;
-}
-function newChar() {
- echo "in newChar()\n";
- return 'j';
-}
-$string[getOffset()] = newChar();
-var_dump($string);
-
-echo "\n\nOrder with static string property assignment:\n";
-C::$string[getOffset()] = newChar();
-var_dump(C::$string);
-
-?>
---EXPECTF--
-
-
-Order with local assignment:
-in f()
-in g()
-%string|unicode%(14) "assigned value"
-
-
-Order with array assignment:
-in f()
-in g()
-array(1) {
- [%u|b%"name"]=>
- %string|unicode%(14) "assigned value"
-}
-
-
-Order with object property assignment:
-in f()
-in g()
-object(stdClass)#%d (1) {
- [%u|b%"assigned value"]=>
- %string|unicode%(14) "assigned value"
-}
-
-
-Order with nested object property assignment:
-in f()
-in g()
-object(stdClass)#%d (1) {
- [%u|b%"o1"]=>
- object(stdClass)#%d (1) {
- [%u|b%"o2"]=>
- object(stdClass)#%d (1) {
- [%u|b%"assigned value"]=>
- %string|unicode%(14) "assigned value"
- }
- }
-}
-
-
-Order with dim_list property assignment:
-in f()
-in g()
-object(stdClass)#%d (1) {
- [%u|b%"a"]=>
- array(1) {
- [%u|b%"assigned value"]=>
- %string|unicode%(14) "assigned value"
- }
-}
-
-
-Order with static property assignment:
-in f()
-in g()
-%string|unicode%(14) "assigned value"
-
-
-Order with static array property assignment:
-in f()
-in g()
-array(1) {
- [%u|b%"name"]=>
- %string|unicode%(14) "assigned value"
-}
-
-
-Order with indexed string assignment:
-in getOffset()
-in newChar()
-%string|unicode%(5) "jello"
-
-
-Order with static string property assignment:
-in getOffset()
-in newChar()
-%string|unicode%(5) "jello"
+--TEST-- +Evaluation order during assignments. +--FILE-- +<?php + +function f() { + echo "in f()\n"; + return "name"; +} + +function g() { + echo "in g()\n"; + return "assigned value"; +} + + +echo "\n\nOrder with local assignment:\n"; +${f()} = g(); +var_dump($name); + +echo "\n\nOrder with array assignment:\n"; +$a[f()] = g(); +var_dump($a); + +echo "\n\nOrder with object property assignment:\n"; +$oa = new stdClass; +$oa->${f()} = g(); +var_dump($oa); + +echo "\n\nOrder with nested object property assignment:\n"; +$ob = new stdClass; +$ob->o1 = new stdClass; +$ob->o1->o2 = new stdClass; +$ob->o1->o2->${f()} = g(); +var_dump($ob); + +echo "\n\nOrder with dim_list property assignment:\n"; +$oc = new stdClass; +$oc->a[${f()}] = g(); +var_dump($oc); + + +class C { + public static $name = "original"; + public static $a = array(); + public static $string = "hello"; +} +echo "\n\nOrder with static property assignment:\n"; +C::${f()} = g(); +var_dump(C::$name); + +echo "\n\nOrder with static array property assignment:\n"; +C::$a[f()] = g(); +var_dump(C::$a); + +echo "\n\nOrder with indexed string assignment:\n"; +$string = "hello"; +function getOffset() { + echo "in getOffset()\n"; + return 0; +} +function newChar() { + echo "in newChar()\n"; + return 'j'; +} +$string[getOffset()] = newChar(); +var_dump($string); + +echo "\n\nOrder with static string property assignment:\n"; +C::$string[getOffset()] = newChar(); +var_dump(C::$string); + +?> +--EXPECTF-- + + +Order with local assignment: +in f() +in g() +%string|unicode%(14) "assigned value" + + +Order with array assignment: +in f() +in g() +array(1) { + [%u|b%"name"]=> + %string|unicode%(14) "assigned value" +} + + +Order with object property assignment: +in f() +in g() +object(stdClass)#%d (1) { + [%u|b%"assigned value"]=> + %string|unicode%(14) "assigned value" +} + + +Order with nested object property assignment: +in f() +in g() +object(stdClass)#%d (1) { + [%u|b%"o1"]=> + object(stdClass)#%d (1) { + [%u|b%"o2"]=> + object(stdClass)#%d (1) { + [%u|b%"assigned value"]=> + %string|unicode%(14) "assigned value" + } + } +} + + +Order with dim_list property assignment: +in f() +in g() +object(stdClass)#%d (1) { + [%u|b%"a"]=> + array(1) { + [%u|b%"assigned value"]=> + %string|unicode%(14) "assigned value" + } +} + + +Order with static property assignment: +in f() +in g() +%string|unicode%(14) "assigned value" + + +Order with static array property assignment: +in f() +in g() +array(1) { + [%u|b%"name"]=> + %string|unicode%(14) "assigned value" +} + + +Order with indexed string assignment: +in getOffset() +in newChar() +%string|unicode%(5) "jello" + + +Order with static string property assignment: +in getOffset() +in newChar() +%string|unicode%(5) "jello" diff --git a/tests/lang/engine_assignExecutionOrder_002.phpt b/tests/lang/engine_assignExecutionOrder_002.phpt index 7830af294..ba88150dd 100644 --- a/tests/lang/engine_assignExecutionOrder_002.phpt +++ b/tests/lang/engine_assignExecutionOrder_002.phpt @@ -1,135 +1,135 @@ ---TEST--
-Evaluation order during assignments.
---FILE--
-<?php
-
-// simple case with missing element
-$f = array("hello","item2","bye");
-list($a,,$b) = $f;
-echo "A=$a B=$b\n";
-
-
-// Warning: Cannot use a scalar value as an array in %s on line %d
-$c[$c=1] = 1;
-
-// i++ evaluated first, so $d[0] is 10
-$d = array(0,10);
-$i = 0;
-$d[$i++] = $i*10;
-// expected array is 10,10
-var_dump($d);
-
-// the f++++ makes f into 2, so $e 0 and 1 should both be 30
-$e = array(0,0);
-$f = 0;
-$g1 = array(10,10);
-$g2 = array(20,20);
-$g3 = array(30,30);
-$g = array($g1,$g2,$g3);
-list($e[$f++],$e[$f++]) = $g[$f];
-// expect 30,30
-var_dump($e);
-
-
-$i1 = array(1,2);
-$i2 = array(10,20);
-$i3 = array(100,200);
-$i4 = array(array(1000,2000),3000);
-$i = array($i1,$i2,$i3,$i4);
-$j = array(0,0,0);
-$h = 0;
-// a list of lists
-list(list($j[$h++],$j[$h++]),$j[$h++]) = $i[$h];
-var_dump($j);
-
-
-// list of lists with just variable assignments - expect 100,200,300
-$k3 = array(100,200);
-$k = array($k3,300);
-list(list($l,$m),$n) = $k;
-echo "L=$l M=$m N=$n\n";
-
-
-// expect $x and $y to be null - this fails on php.net 5.2.1 (invalid opcode) - fixed in 5.2.3
-list($o,$p) = 20;
-echo "O=$o and P=$p\n";
-
-
-// list of lists with blanks and nulls expect 10 20 40 50 60 70 80
-$q1 = array(10,20,30,40);
-$q2 = array(50,60);
-$q3 = array($q1,$q2,null,70);
-$q4 = array($q3,null,80);
-
-list(list(list($r,$s,,$t),list($u,$v),,$w),,$x) = $q4;
-echo "$r $s $t $u $v $w $x\n";
-
-
-// expect y and z to be undefined
-list($y,$z) = array();
-echo "Y=$y,Z=$z\n";
-
-// expect h to be defined and be 10
-list($aa,$bb) = array(10);
-echo "AA=$aa\n";
-
-// expect cc and dd to be 10 and 30
-list($cc,,$dd) = array(10,20,30,40);
-echo "CC=$cc DD=$dd\n";
-
-// expect the inner array to be defined
-$ee = array("original array");
-function f() {
- global $ee;
- $ee = array("array created in f()");
- return 1;
-}
-$ee["array entry created after f()"][f()] = "hello";
-print_r($ee);
-
-?>
---EXPECTF--
-A=hello B=bye
-
-Warning: Cannot use a scalar value as an array in %s on line %d
-array(2) {
- [0]=>
- int(10)
- [1]=>
- int(10)
-}
-array(2) {
- [0]=>
- int(30)
- [1]=>
- int(30)
-}
-array(3) {
- [0]=>
- int(1000)
- [1]=>
- int(2000)
- [2]=>
- int(3000)
-}
-L=100 M=200 N=300
-O= and P=
-10 20 40 50 60 70 80
-
-Notice: Undefined offset: 1 in %s on line %d
-
-Notice: Undefined offset: 0 in %s on line %d
-Y=,Z=
-
-Notice: Undefined offset: 1 in %s on line %d
-AA=10
-CC=10 DD=30
-Array
-(
- [0] => array created in f()
- [array entry created after f()] => Array
- (
- [1] => hello
- )
-
-)
+--TEST-- +Evaluation order during assignments. +--FILE-- +<?php + +// simple case with missing element +$f = array("hello","item2","bye"); +list($a,,$b) = $f; +echo "A=$a B=$b\n"; + + +// Warning: Cannot use a scalar value as an array in %s on line %d +$c[$c=1] = 1; + +// i++ evaluated first, so $d[0] is 10 +$d = array(0,10); +$i = 0; +$d[$i++] = $i*10; +// expected array is 10,10 +var_dump($d); + +// the f++++ makes f into 2, so $e 0 and 1 should both be 30 +$e = array(0,0); +$f = 0; +$g1 = array(10,10); +$g2 = array(20,20); +$g3 = array(30,30); +$g = array($g1,$g2,$g3); +list($e[$f++],$e[$f++]) = $g[$f]; +// expect 30,30 +var_dump($e); + + +$i1 = array(1,2); +$i2 = array(10,20); +$i3 = array(100,200); +$i4 = array(array(1000,2000),3000); +$i = array($i1,$i2,$i3,$i4); +$j = array(0,0,0); +$h = 0; +// a list of lists +list(list($j[$h++],$j[$h++]),$j[$h++]) = $i[$h]; +var_dump($j); + + +// list of lists with just variable assignments - expect 100,200,300 +$k3 = array(100,200); +$k = array($k3,300); +list(list($l,$m),$n) = $k; +echo "L=$l M=$m N=$n\n"; + + +// expect $x and $y to be null - this fails on php.net 5.2.1 (invalid opcode) - fixed in 5.2.3 +list($o,$p) = 20; +echo "O=$o and P=$p\n"; + + +// list of lists with blanks and nulls expect 10 20 40 50 60 70 80 +$q1 = array(10,20,30,40); +$q2 = array(50,60); +$q3 = array($q1,$q2,null,70); +$q4 = array($q3,null,80); + +list(list(list($r,$s,,$t),list($u,$v),,$w),,$x) = $q4; +echo "$r $s $t $u $v $w $x\n"; + + +// expect y and z to be undefined +list($y,$z) = array(); +echo "Y=$y,Z=$z\n"; + +// expect h to be defined and be 10 +list($aa,$bb) = array(10); +echo "AA=$aa\n"; + +// expect cc and dd to be 10 and 30 +list($cc,,$dd) = array(10,20,30,40); +echo "CC=$cc DD=$dd\n"; + +// expect the inner array to be defined +$ee = array("original array"); +function f() { + global $ee; + $ee = array("array created in f()"); + return 1; +} +$ee["array entry created after f()"][f()] = "hello"; +print_r($ee); + +?> +--EXPECTF-- +A=hello B=bye + +Warning: Cannot use a scalar value as an array in %s on line %d +array(2) { + [0]=> + int(10) + [1]=> + int(10) +} +array(2) { + [0]=> + int(30) + [1]=> + int(30) +} +array(3) { + [0]=> + int(1000) + [1]=> + int(2000) + [2]=> + int(3000) +} +L=100 M=200 N=300 +O= and P= +10 20 40 50 60 70 80 + +Notice: Undefined offset: 1 in %s on line %d + +Notice: Undefined offset: 0 in %s on line %d +Y=,Z= + +Notice: Undefined offset: 1 in %s on line %d +AA=10 +CC=10 DD=30 +Array +( + [0] => array created in f() + [array entry created after f()] => Array + ( + [1] => hello + ) + +) diff --git a/tests/lang/engine_assignExecutionOrder_003.phpt b/tests/lang/engine_assignExecutionOrder_003.phpt index 71c87c9d8..ae3ae787c 100644 --- a/tests/lang/engine_assignExecutionOrder_003.phpt +++ b/tests/lang/engine_assignExecutionOrder_003.phpt @@ -1,96 +1,96 @@ ---TEST--
-Evaluation order during assignments.
---FILE--
-<?php
-$b = "bb";
-$a = "aa";
-
-function foo()
-{
-echo "Bad call\n";
-}
-
-function baa()
-{
-echo "Good call\n";
-}
-
-$bb = "baa";
-
-$aa = "foo";
-
-$c = ${$a=$b};
-
-$c();
-
-$a1 = array("dead","dead","dead");
-$a2 = array("dead","dead","live");
-$a3 = array("dead","dead","dead");
-
-$a = array($a1,$a2,$a3);
-
-function live()
-{
-echo "Good call\n";
-}
-
-function dead()
-{
-echo "Bad call\n";
-}
-
-$i = 0;
-
-$a[$i=1][++$i]();
-
-$a = -1;
-
-function foo1()
-{
- global $a;
- return ++$a;
-}
-
-$arr = array(array(0,0),0);
-
-$brr = array(0,0,array(0,0,0,5),0);
-$crr = array(0,0,0,0,array(0,0,0,0,0,10),0,0);
-
-$arr[foo1()][foo1()] = $brr[foo1()][foo1()] +
- $crr[foo1()][foo1()];
-
-$val = $arr[0][1];
-echo "Expect 15 and get...$val\n";
-
-$x = array(array(0),0);
-function mod($b)
-{
-global $x;
-$x = $b;
-return 0;
-}
-
-$x1 = array(array(1),1);
-$x2 = array(array(2),2);
-$x3 = array(array(3),3);
-$bx = array(10);
-
-$x[mod($x1)][mod($x2)] = $bx[mod($x3)];
-
-// expecting 10,3
-
-var_dump($x);
-?>
---EXPECT--
-Good call
-Good call
-Expect 15 and get...15
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(10)
- }
- [1]=>
- int(3)
+--TEST-- +Evaluation order during assignments. +--FILE-- +<?php +$b = "bb"; +$a = "aa"; + +function foo() +{ +echo "Bad call\n"; +} + +function baa() +{ +echo "Good call\n"; +} + +$bb = "baa"; + +$aa = "foo"; + +$c = ${$a=$b}; + +$c(); + +$a1 = array("dead","dead","dead"); +$a2 = array("dead","dead","live"); +$a3 = array("dead","dead","dead"); + +$a = array($a1,$a2,$a3); + +function live() +{ +echo "Good call\n"; +} + +function dead() +{ +echo "Bad call\n"; +} + +$i = 0; + +$a[$i=1][++$i](); + +$a = -1; + +function foo1() +{ + global $a; + return ++$a; +} + +$arr = array(array(0,0),0); + +$brr = array(0,0,array(0,0,0,5),0); +$crr = array(0,0,0,0,array(0,0,0,0,0,10),0,0); + +$arr[foo1()][foo1()] = $brr[foo1()][foo1()] + + $crr[foo1()][foo1()]; + +$val = $arr[0][1]; +echo "Expect 15 and get...$val\n"; + +$x = array(array(0),0); +function mod($b) +{ +global $x; +$x = $b; +return 0; +} + +$x1 = array(array(1),1); +$x2 = array(array(2),2); +$x3 = array(array(3),3); +$bx = array(10); + +$x[mod($x1)][mod($x2)] = $bx[mod($x3)]; + +// expecting 10,3 + +var_dump($x); +?> +--EXPECT-- +Good call +Good call +Expect 15 and get...15 +array(2) { + [0]=> + array(1) { + [0]=> + int(10) + } + [1]=> + int(3) }
\ No newline at end of file diff --git a/tests/lang/engine_assignExecutionOrder_004.phpt b/tests/lang/engine_assignExecutionOrder_004.phpt index 09ff8bd76..86bc87f9c 100644 --- a/tests/lang/engine_assignExecutionOrder_004.phpt +++ b/tests/lang/engine_assignExecutionOrder_004.phpt @@ -1,52 +1,52 @@ ---TEST--
-Evaluation order during assignments.
---FILE--
-<?php
-
-function i1() {
- echo "i1\n";
- return 1;
-}
-
-function i2() {
- echo "i2\n";
- return 1;
-}
-
-function i3() {
- echo "i3\n";
- return 3;
-}
-
-function i4() {
- global $a;
- $a = array(10, 11, 12, 13, 14);
- echo "i4\n";
- return 4;
-}
-
-$a = 0; // $a should not be indexable till the i4 has been executed
-list($a[i1()+i2()], , list($a[i3()], $a[i4()]), $a[]) = array (0, 1, array(30, 40), 3, 4);
-
-var_dump($a);
-
-?>
---EXPECT--
-i1
-i2
-i3
-i4
-array(6) {
- [0]=>
- int(10)
- [1]=>
- int(11)
- [2]=>
- int(0)
- [3]=>
- int(30)
- [4]=>
- int(40)
- [5]=>
- int(3)
-}
+--TEST-- +Evaluation order during assignments. +--FILE-- +<?php + +function i1() { + echo "i1\n"; + return 1; +} + +function i2() { + echo "i2\n"; + return 1; +} + +function i3() { + echo "i3\n"; + return 3; +} + +function i4() { + global $a; + $a = array(10, 11, 12, 13, 14); + echo "i4\n"; + return 4; +} + +$a = 0; // $a should not be indexable till the i4 has been executed +list($a[i1()+i2()], , list($a[i3()], $a[i4()]), $a[]) = array (0, 1, array(30, 40), 3, 4); + +var_dump($a); + +?> +--EXPECT-- +i1 +i2 +i3 +i4 +array(6) { + [0]=> + int(10) + [1]=> + int(11) + [2]=> + int(0) + [3]=> + int(30) + [4]=> + int(40) + [5]=> + int(3) +} diff --git a/tests/lang/engine_assignExecutionOrder_005.phpt b/tests/lang/engine_assignExecutionOrder_005.phpt index 82715dbda..6ec03f17c 100644 --- a/tests/lang/engine_assignExecutionOrder_005.phpt +++ b/tests/lang/engine_assignExecutionOrder_005.phpt @@ -1,74 +1,74 @@ ---TEST--
-Evaluation order during assignments.
---FILE--
-<?php
-
-function i1() {
- echo "i1\n";
- return 0;
-}
-
-function i2() {
- echo "i2\n";
- return 0;
-}
-
-function i3() {
- echo "i3\n";
- return 0;
-}
-
-function i4() {
- echo "i4\n";
- return 0;
-}
-
-function i5() {
- echo "i5\n";
- return 0;
-}
-
-function i6() {
- echo "i6\n";
- return 0;
-}
-
-$a = array(array(0));
-$b = array(array(1));
-$c = array(array(2));
-
-$a[i1()][i2()] = $b[i3()][i4()] = $c[i5()][i6()];
-
-var_dump($a);
-var_dump($b);
-var_dump($c);
-
-?>
---EXPECT--
-i1
-i2
-i3
-i4
-i5
-i6
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
+--TEST-- +Evaluation order during assignments. +--FILE-- +<?php + +function i1() { + echo "i1\n"; + return 0; +} + +function i2() { + echo "i2\n"; + return 0; +} + +function i3() { + echo "i3\n"; + return 0; +} + +function i4() { + echo "i4\n"; + return 0; +} + +function i5() { + echo "i5\n"; + return 0; +} + +function i6() { + echo "i6\n"; + return 0; +} + +$a = array(array(0)); +$b = array(array(1)); +$c = array(array(2)); + +$a[i1()][i2()] = $b[i3()][i4()] = $c[i5()][i6()]; + +var_dump($a); +var_dump($b); +var_dump($c); + +?> +--EXPECT-- +i1 +i2 +i3 +i4 +i5 +i6 +array(1) { + [0]=> + array(1) { + [0]=> + int(2) + } +} +array(1) { + [0]=> + array(1) { + [0]=> + int(2) + } +} +array(1) { + [0]=> + array(1) { + [0]=> + int(2) + } +} diff --git a/tests/lang/engine_assignExecutionOrder_006.phpt b/tests/lang/engine_assignExecutionOrder_006.phpt index ac90db8f1..faa34c387 100644 --- a/tests/lang/engine_assignExecutionOrder_006.phpt +++ b/tests/lang/engine_assignExecutionOrder_006.phpt @@ -1,138 +1,138 @@ ---TEST--
-Evaluation order during assignments.
---FILE--
-<?php
-
-function i1() {
- echo "i1\n";
- return 0;
-}
-
-function i2() {
- echo "i2\n";
- return 0;
-}
-
-function i3() {
- echo "i3\n";
- return 0;
-}
-
-function i4() {
- echo "i4\n";
- return 0;
-}
-
-function i5() {
- echo "i5\n";
- return 0;
-}
-
-function i6() {
- echo "i6\n";
- return 0;
-}
-
-$a = array(array(0));
-$b = array(array(1));
-$c = array(array(2));
-
-$a[i1()][i2()] = ($b[i3()][i4()] = $c[i5()][i6()]);
-var_dump($a);
-var_dump($b);
-var_dump($c);
-
-$a[i1()][i2()] = $b[i3()][i4()] = -$c[i5()][i6()];
-var_dump($a);
-var_dump($b);
-var_dump($c);
-
-$a[i1()][i2()] = -($b[i3()][i4()] = +($c[i5()][i6()]));
-var_dump($a);
-var_dump($b);
-var_dump($c);
-
-
-?>
---EXPECT--
-i1
-i2
-i3
-i4
-i5
-i6
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-i1
-i2
-i3
-i4
-i5
-i6
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(-2)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(-2)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-i1
-i2
-i3
-i4
-i5
-i6
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(-2)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
+--TEST-- +Evaluation order during assignments. +--FILE-- +<?php + +function i1() { + echo "i1\n"; + return 0; +} + +function i2() { + echo "i2\n"; + return 0; +} + +function i3() { + echo "i3\n"; + return 0; +} + +function i4() { + echo "i4\n"; + return 0; +} + +function i5() { + echo "i5\n"; + return 0; +} + +function i6() { + echo "i6\n"; + return 0; +} + +$a = array(array(0)); +$b = array(array(1)); +$c = array(array(2)); + +$a[i1()][i2()] = ($b[i3()][i4()] = $c[i5()][i6()]); +var_dump($a); +var_dump($b); +var_dump($c); + +$a[i1()][i2()] = $b[i3()][i4()] = -$c[i5()][i6()]; +var_dump($a); +var_dump($b); +var_dump($c); + +$a[i1()][i2()] = -($b[i3()][i4()] = +($c[i5()][i6()])); +var_dump($a); +var_dump($b); +var_dump($c); + + +?> +--EXPECT-- +i1 +i2 +i3 +i4 +i5 +i6 +array(1) { + [0]=> + array(1) { + [0]=> + int(2) + } +} +array(1) { + [0]=> + array(1) { + [0]=> + int(2) + } +} +array(1) { + [0]=> + array(1) { + [0]=> + int(2) + } +} +i1 +i2 +i3 +i4 +i5 +i6 +array(1) { + [0]=> + array(1) { + [0]=> + int(-2) + } +} +array(1) { + [0]=> + array(1) { + [0]=> + int(-2) + } +} +array(1) { + [0]=> + array(1) { + [0]=> + int(2) + } +} +i1 +i2 +i3 +i4 +i5 +i6 +array(1) { + [0]=> + array(1) { + [0]=> + int(-2) + } +} +array(1) { + [0]=> + array(1) { + [0]=> + int(2) + } +} +array(1) { + [0]=> + array(1) { + [0]=> + int(2) + } +} diff --git a/tests/lang/engine_assignExecutionOrder_007.phpt b/tests/lang/engine_assignExecutionOrder_007.phpt index a5270df82..56b729ed8 100644 --- a/tests/lang/engine_assignExecutionOrder_007.phpt +++ b/tests/lang/engine_assignExecutionOrder_007.phpt @@ -1,46 +1,46 @@ ---TEST--
-Check key execution order with &new.
---FILE--
-<?php
-$a[2][3] = 'stdClass';
-$a[$i=0][++$i] =& new $a[++$i][++$i];
-print_r($a);
-
-$o = new stdClass;
-$o->a =& new $a[$i=2][++$i];
-$o->a->b =& new $a[$i=2][++$i];
-print_r($o);
-?>
---EXPECTF--
-Deprecated: Assigning the return value of new by reference is deprecated in %s.php on line 3
-
-Deprecated: Assigning the return value of new by reference is deprecated in %s.php on line 7
-
-Deprecated: Assigning the return value of new by reference is deprecated in %s.php on line 8
-Array
-(
- [2] => Array
- (
- [3] => stdClass
- )
-
- [0] => Array
- (
- [1] => stdClass Object
- (
- )
-
- )
-
-)
-stdClass Object
-(
- [a] => stdClass Object
- (
- [b] => stdClass Object
- (
- )
-
- )
-
-)
+--TEST-- +Check key execution order with &new. +--FILE-- +<?php +$a[2][3] = 'stdClass'; +$a[$i=0][++$i] =& new $a[++$i][++$i]; +print_r($a); + +$o = new stdClass; +$o->a =& new $a[$i=2][++$i]; +$o->a->b =& new $a[$i=2][++$i]; +print_r($o); +?> +--EXPECTF-- +Deprecated: Assigning the return value of new by reference is deprecated in %s.php on line 3 + +Deprecated: Assigning the return value of new by reference is deprecated in %s.php on line 7 + +Deprecated: Assigning the return value of new by reference is deprecated in %s.php on line 8 +Array +( + [2] => Array + ( + [3] => stdClass + ) + + [0] => Array + ( + [1] => stdClass Object + ( + ) + + ) + +) +stdClass Object +( + [a] => stdClass Object + ( + [b] => stdClass Object + ( + ) + + ) + +) diff --git a/tests/lang/engine_assignExecutionOrder_008.phpt b/tests/lang/engine_assignExecutionOrder_008.phpt index 301fa541a..0d699bc64 100644 --- a/tests/lang/engine_assignExecutionOrder_008.phpt +++ b/tests/lang/engine_assignExecutionOrder_008.phpt @@ -1,75 +1,75 @@ ---TEST--
-Ensure by value assignments leave temporaries on the stack, for all sorts of assignees.
---FILE--
-<?php
-error_reporting(E_ALL & ~E_STRICT);
-
-function f() { return 0; }
-$a[0][1] = 'good';
-$a[1][1] = 'bad';
-
-echo "\n" . '$i=f(): ';
-echo $a[$i=f()][++$i];
-unset($i);
-
-echo "\n" . '$$x=f(): ';
-$x='i';
-echo $a[$$x=f()][++$$x];
-unset($i, $x);
-
-echo "\n" . '${\'i\'}=f(): ';
-echo $a[${'i'}=f()][++${'i'}];
-unset(${'i'});
-
-echo "\n" . '$i[0]=f(): ';
-echo $a[$i[0]=f()][++$i[0]];
-unset($i);
-
-echo "\n" . '$i[0][0]=f(): ';
-echo $a[$i[0][0]=f()][++$i[0][0]];
-unset($i);
-
-echo "\n" . '$i->p=f(): ';
-echo $a[$i->p=f()][++$i->p];
-unset($i);
-
-echo "\n" . '$i->p->q=f(): ';
-echo $a[$i->p->q=f()][++$i->p->q];
-unset($i);
-
-echo "\n" . '$i->p[0]=f(): ';
-echo $a[$i->p[0]=f()][++$i->p[0]];
-unset($i);
-
-echo "\n" . '$i->p[0]->p=f(): ';
-echo $a[$i->p[0]->p=f()][++$i->p[0]->p];
-unset($i);
-
-Class C {
- static $p;
-}
-
-echo "\n" . 'C::$p=f(): ';
-echo $a[C::$p=f()][++C::$p];
-
-echo "\n" . 'C::$p[0]=f(): ';
-C::$p = array();
-echo $a[C::$p[0]=f()][++C::$p[0]];
-
-echo "\n" . 'C::$p->q=f(): ';
-C::$p = new stdclass;
-echo $a[C::$p->q=f()][++C::$p->q];
-?>
---EXPECTF--
-$i=f(): good
-$$x=f(): good
-${'i'}=f(): good
-$i[0]=f(): good
-$i[0][0]=f(): good
-$i->p=f(): good
-$i->p->q=f(): good
-$i->p[0]=f(): good
-$i->p[0]->p=f(): good
-C::$p=f(): good
-C::$p[0]=f(): good
+--TEST-- +Ensure by value assignments leave temporaries on the stack, for all sorts of assignees. +--FILE-- +<?php +error_reporting(E_ALL & ~E_STRICT); + +function f() { return 0; } +$a[0][1] = 'good'; +$a[1][1] = 'bad'; + +echo "\n" . '$i=f(): '; +echo $a[$i=f()][++$i]; +unset($i); + +echo "\n" . '$$x=f(): '; +$x='i'; +echo $a[$$x=f()][++$$x]; +unset($i, $x); + +echo "\n" . '${\'i\'}=f(): '; +echo $a[${'i'}=f()][++${'i'}]; +unset(${'i'}); + +echo "\n" . '$i[0]=f(): '; +echo $a[$i[0]=f()][++$i[0]]; +unset($i); + +echo "\n" . '$i[0][0]=f(): '; +echo $a[$i[0][0]=f()][++$i[0][0]]; +unset($i); + +echo "\n" . '$i->p=f(): '; +echo $a[$i->p=f()][++$i->p]; +unset($i); + +echo "\n" . '$i->p->q=f(): '; +echo $a[$i->p->q=f()][++$i->p->q]; +unset($i); + +echo "\n" . '$i->p[0]=f(): '; +echo $a[$i->p[0]=f()][++$i->p[0]]; +unset($i); + +echo "\n" . '$i->p[0]->p=f(): '; +echo $a[$i->p[0]->p=f()][++$i->p[0]->p]; +unset($i); + +Class C { + static $p; +} + +echo "\n" . 'C::$p=f(): '; +echo $a[C::$p=f()][++C::$p]; + +echo "\n" . 'C::$p[0]=f(): '; +C::$p = array(); +echo $a[C::$p[0]=f()][++C::$p[0]]; + +echo "\n" . 'C::$p->q=f(): '; +C::$p = new stdclass; +echo $a[C::$p->q=f()][++C::$p->q]; +?> +--EXPECTF-- +$i=f(): good +$$x=f(): good +${'i'}=f(): good +$i[0]=f(): good +$i[0][0]=f(): good +$i->p=f(): good +$i->p->q=f(): good +$i->p[0]=f(): good +$i->p[0]->p=f(): good +C::$p=f(): good +C::$p[0]=f(): good C::$p->q=f(): good
\ No newline at end of file diff --git a/tests/lang/engine_assignExecutionOrder_009.phpt b/tests/lang/engine_assignExecutionOrder_009.phpt index 58300a171..e1d5b71c6 100644 --- a/tests/lang/engine_assignExecutionOrder_009.phpt +++ b/tests/lang/engine_assignExecutionOrder_009.phpt @@ -1,36 +1,36 @@ ---TEST--
-Execution ordering with comparison operators.
---FILE--
-<?php
-function f($x) {
- echo "f($x) ";
- return $x;
-}
-
-echo "Function call args:\n";
-var_dump(f($i=0) < f(++$i));
-var_dump(f($i=0) <= f(++$i));
-var_dump(f($i=0) > f(++$i));
-var_dump(f($i=0) >= f(++$i));
-
-echo "\nArray indices:\n";
-$a[1][2] = 0;
-$a[3][4] = 1;
-$i=0;
-var_dump($a[$i=1][++$i] < $a[++$i][++$i]);
-var_dump($a[$i=1][++$i] <= $a[++$i][++$i]);
-var_dump($a[$i=1][++$i] > $a[++$i][++$i]);
-var_dump($a[$i=1][++$i] >= $a[++$i][++$i]);
-?>
---EXPECTF--
-Function call args:
-f(0) f(1) bool(true)
-f(0) f(1) bool(true)
-f(0) f(1) bool(false)
-f(0) f(1) bool(false)
-
-Array indices:
-bool(true)
-bool(true)
-bool(false)
-bool(false)
+--TEST-- +Execution ordering with comparison operators. +--FILE-- +<?php +function f($x) { + echo "f($x) "; + return $x; +} + +echo "Function call args:\n"; +var_dump(f($i=0) < f(++$i)); +var_dump(f($i=0) <= f(++$i)); +var_dump(f($i=0) > f(++$i)); +var_dump(f($i=0) >= f(++$i)); + +echo "\nArray indices:\n"; +$a[1][2] = 0; +$a[3][4] = 1; +$i=0; +var_dump($a[$i=1][++$i] < $a[++$i][++$i]); +var_dump($a[$i=1][++$i] <= $a[++$i][++$i]); +var_dump($a[$i=1][++$i] > $a[++$i][++$i]); +var_dump($a[$i=1][++$i] >= $a[++$i][++$i]); +?> +--EXPECTF-- +Function call args: +f(0) f(1) bool(true) +f(0) f(1) bool(true) +f(0) f(1) bool(false) +f(0) f(1) bool(false) + +Array indices: +bool(true) +bool(true) +bool(false) +bool(false) diff --git a/tests/lang/execution_order.phpt b/tests/lang/execution_order.phpt index dc9279146..ca3feb32c 100644 --- a/tests/lang/execution_order.phpt +++ b/tests/lang/execution_order.phpt @@ -1,198 +1,198 @@ ---TEST--
-Execution order of variables
---FILE--
-<?php
-
-/* strings and concat */
-
-class strclass {
- var $str = "bad";
- static $statstr = "bad";
-}
-
-$a = "bad";
-$b = "good";
-echo "1)";
-$c = $a.($a=$b);
-echo $c;
-echo "\r\n";
-
-$a = "bad";
-$b = "good";
-$c = ($a=$b).$a;
-echo "2)";
-echo $c;
-echo "\r\n";
-
-
-$str = new strclass();
-$c = $str->str.($str->str="good");
-echo "3)";
-echo $c;
-echo "\r\n";
-
-$str->str = "bad";
-
-$c = ($str->str="good").$str->str;
-echo "4)";
-echo $c;
-echo "\r\n";
-
-$c = strclass::$statstr.(strclass::$statstr="good");
-echo "5)";
-echo $c;
-echo "\r\n";
-
-strclass::$statstr = "bad";
-
-$c = (strclass::$statstr="good").strclass::$statstr;
-echo "6)";
-echo $c;
-echo "\r\n";
-
-
-function foo() {
- global $a;
- $a = "good";
- return $a;
-}
-
-
-$a = "bad";
-echo "7)";
-echo foo() . $a;
-echo "\r\n";
-
-$a = "bad";
-echo "8)";
-echo $a . foo();
-echo "\r\n";
-
-/* other operators */
-
-$x = 1;
-$z = $x - ($x++);
-echo "9)";
-echo $z;
-echo "\r\n";
-
-$x = 1;
-$z = ($x++) - $x;
-echo "10)";
-echo $z;
-echo "\r\n";
-
-$x = 1;
-$z = $x - (++$x);
-echo "11)";
-echo $z;
-echo "\r\n";
-
-$x = 1;
-$z = (++$x) - $x;
-echo "12)";
-echo $z;
-echo "\r\n";
-
-
-$x = 1;
-$y = 3;
-$z = $x - ($x=$y);
-echo "13)";
-echo $z;
-echo "\r\n";
-
-$x = 1;
-$y = 3;
-$z = ($x=$y) - $x;
-echo "14)";
-echo $z;
-echo "\r\n";
-
-
-$a = 100;
-$b = 200;
-echo "15)";
-echo $a + ($a=$b);
-echo "\r\n";
-
-$a = 100;
-$b = 200;
-echo "16)";
-echo ($a=$b) + $a;
-echo "\r\n";
-
-
-$a = array(100,200);
-$i = 0;
-
-echo "17)";
-echo $a[$i++] + $a[$i++];
-echo "\r\n";
-
-$i = -1;
-echo "18)";
-echo $a[++$i] + $a[++$i];
-echo "\r\n";
-
-$i = 0;
-echo "19)";
-echo $a[$i] + ($a[$i]=400);
-echo "\r\n";
-
-
-$a[0] = 100;
-echo "20)";
-echo ($a[$i]=400) + $a[$i];
-echo "\r\n";
-
-
-class c {
- var $val = 10;
- static $stat = 20;
-}
-
-echo "21)";
-echo c::$stat + (c::$stat=200);
-echo "\r\n";
-
-echo "22)";
-echo (c::$stat=300) + c::$stat;
-echo "\r\n";
-
-$c = new c();
-
-echo "23)";
-echo $c->val + ($c->val=200);
-echo "\r\n";
-
-echo "24)";
-echo ($c->val=300) + $c->val;
-echo "\r\n";
-
-?>
---EXPECT--
-1)goodgood
-2)goodgood
-3)badgood
-4)goodgood
-5)badgood
-6)goodgood
-7)goodgood
-8)goodgood
-9)1
-10)-1
-11)0
-12)0
-13)0
-14)0
-15)400
-16)400
-17)300
-18)300
-19)500
-20)800
-21)220
-22)600
-23)210
-24)600
+--TEST-- +Execution order of variables +--FILE-- +<?php + +/* strings and concat */ + +class strclass { + var $str = "bad"; + static $statstr = "bad"; +} + +$a = "bad"; +$b = "good"; +echo "1)"; +$c = $a.($a=$b); +echo $c; +echo "\r\n"; + +$a = "bad"; +$b = "good"; +$c = ($a=$b).$a; +echo "2)"; +echo $c; +echo "\r\n"; + + +$str = new strclass(); +$c = $str->str.($str->str="good"); +echo "3)"; +echo $c; +echo "\r\n"; + +$str->str = "bad"; + +$c = ($str->str="good").$str->str; +echo "4)"; +echo $c; +echo "\r\n"; + +$c = strclass::$statstr.(strclass::$statstr="good"); +echo "5)"; +echo $c; +echo "\r\n"; + +strclass::$statstr = "bad"; + +$c = (strclass::$statstr="good").strclass::$statstr; +echo "6)"; +echo $c; +echo "\r\n"; + + +function foo() { + global $a; + $a = "good"; + return $a; +} + + +$a = "bad"; +echo "7)"; +echo foo() . $a; +echo "\r\n"; + +$a = "bad"; +echo "8)"; +echo $a . foo(); +echo "\r\n"; + +/* other operators */ + +$x = 1; +$z = $x - ($x++); +echo "9)"; +echo $z; +echo "\r\n"; + +$x = 1; +$z = ($x++) - $x; +echo "10)"; +echo $z; +echo "\r\n"; + +$x = 1; +$z = $x - (++$x); +echo "11)"; +echo $z; +echo "\r\n"; + +$x = 1; +$z = (++$x) - $x; +echo "12)"; +echo $z; +echo "\r\n"; + + +$x = 1; +$y = 3; +$z = $x - ($x=$y); +echo "13)"; +echo $z; +echo "\r\n"; + +$x = 1; +$y = 3; +$z = ($x=$y) - $x; +echo "14)"; +echo $z; +echo "\r\n"; + + +$a = 100; +$b = 200; +echo "15)"; +echo $a + ($a=$b); +echo "\r\n"; + +$a = 100; +$b = 200; +echo "16)"; +echo ($a=$b) + $a; +echo "\r\n"; + + +$a = array(100,200); +$i = 0; + +echo "17)"; +echo $a[$i++] + $a[$i++]; +echo "\r\n"; + +$i = -1; +echo "18)"; +echo $a[++$i] + $a[++$i]; +echo "\r\n"; + +$i = 0; +echo "19)"; +echo $a[$i] + ($a[$i]=400); +echo "\r\n"; + + +$a[0] = 100; +echo "20)"; +echo ($a[$i]=400) + $a[$i]; +echo "\r\n"; + + +class c { + var $val = 10; + static $stat = 20; +} + +echo "21)"; +echo c::$stat + (c::$stat=200); +echo "\r\n"; + +echo "22)"; +echo (c::$stat=300) + c::$stat; +echo "\r\n"; + +$c = new c(); + +echo "23)"; +echo $c->val + ($c->val=200); +echo "\r\n"; + +echo "24)"; +echo ($c->val=300) + $c->val; +echo "\r\n"; + +?> +--EXPECT-- +1)goodgood +2)goodgood +3)badgood +4)goodgood +5)badgood +6)goodgood +7)goodgood +8)goodgood +9)1 +10)-1 +11)0 +12)0 +13)0 +14)0 +15)400 +16)400 +17)300 +18)300 +19)500 +20)800 +21)220 +22)600 +23)210 +24)600 diff --git a/tests/security/open_basedir_parse_ini_file.phpt b/tests/security/open_basedir_parse_ini_file.phpt index ac740f073..926c07771 100644 --- a/tests/security/open_basedir_parse_ini_file.phpt +++ b/tests/security/open_basedir_parse_ini_file.phpt @@ -39,43 +39,43 @@ bool(true) Warning: parse_ini_file(): open_basedir restriction in effect. File(%s\test\bad) is not within the allowed path(s): (.) in %s on line %d -Warning: parse_ini_file(%s\test\bad): failed to open stream: Operation not permitted in %s on line %d +Warning: parse_ini_file(%s\test\bad): failed to open stream: %s in %s on line %d array(0) { } Warning: parse_ini_file(): open_basedir restriction in effect. File(%s\test\bad\bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: parse_ini_file(%s\test\bad\bad.txt): failed to open stream: Operation not permitted in %s on line %d +Warning: parse_ini_file(%s\test\bad\bad.txt): failed to open stream: %s in %s on line %d array(0) { } Warning: parse_ini_file(): open_basedir restriction in effect. File(%s\test) is not within the allowed path(s): (.) in %s on line %d -Warning: parse_ini_file(%s\test): failed to open stream: Operation not permitted in %s on line %d +Warning: parse_ini_file(%s\test): failed to open stream: %s in %s on line %d array(0) { } Warning: parse_ini_file(): open_basedir restriction in effect. File(%s\test) is not within the allowed path(s): (.) in %s on line %d -Warning: parse_ini_file(%s\test): failed to open stream: Operation not permitted in %s on line %d +Warning: parse_ini_file(%s\test): failed to open stream: %s in %s on line %d array(0) { } Warning: parse_ini_file(): open_basedir restriction in effect. File(%s\test\bad) is not within the allowed path(s): (.) in %s on line %d -Warning: parse_ini_file(%s\test\bad): failed to open stream: Operation not permitted in %s on line %d +Warning: parse_ini_file(%s\test\bad): failed to open stream: %s in %s on line %d array(0) { } Warning: parse_ini_file(): open_basedir restriction in effect. File(%s\test\bad\bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: parse_ini_file(%s\test\bad\bad.txt): failed to open stream: Operation not permitted in %s on line %d +Warning: parse_ini_file(%s\test\bad\bad.txt): failed to open stream: %s in %s on line %d array(0) { } Warning: parse_ini_file(): open_basedir restriction in effect. File(%s\test) is not within the allowed path(s): (.) in %s on line %d -Warning: parse_ini_file(%s\test): failed to open stream: Operation not permitted in %s on line %d +Warning: parse_ini_file(%s\test): failed to open stream: %s in %s on line %d array(0) { } *** Finished testing open_basedir configuration [parse_ini_file] *** |
