]> granicus.if.org Git - php/commitdiff
Fix tests for E_STRICT and check for E_STRICT in run-tests.php.
authorMarcus Boerger <helly@php.net>
Sun, 30 Nov 2003 13:57:20 +0000 (13:57 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 30 Nov 2003 13:57:20 +0000 (13:57 +0000)
32 files changed:
ext/session/tests/001.phpt
ext/session/tests/003.phpt
ext/session/tests/004.phpt
ext/session/tests/005.phpt
ext/session/tests/006.phpt
ext/session/tests/019.phpt
ext/standard/tests/file/fopencookie.phpt
ext/standard/tests/file/userstreams.phpt
ext/standard/tests/serialize/bug21957.phpt
run-tests.php
tests/classes/__call_001.phpt
tests/classes/bug23951.phpt
tests/classes/bug24399.phpt
tests/classes/class_example.phpt
tests/classes/destructor_and_references.phpt
tests/classes/inheritance.phpt
tests/classes/interface_doubled.phpt
tests/classes/interface_implemented.phpt
tests/classes/interface_member.phpt
tests/classes/object_reference_001.phpt
tests/lang/bug21669.phpt
tests/lang/bug21961.phpt
tests/lang/bug22231.phpt
tests/lang/bug22367.phpt
tests/lang/bug22510.phpt
tests/lang/bug23922.phpt
tests/lang/bug24403.phpt
tests/lang/bug25652.phpt
tests/lang/bug26182.phpt
tests/run-test/test005.phpt
tests/run-test/test008.phpt
tests/run-test/test008a.phpt

index f499029a73c0be8ed3e853163b956bfd57bd30aa..54918b5799b7fae374a258ab58aa4854af85ea80 100644 (file)
@@ -12,7 +12,7 @@ session.serialize_handler=php
 error_reporting(E_ALL);
 
 class foo {
-       var $bar = "ok";
+       public $bar = "ok";
 
        function method() { $this->yes = "done"; }
 }
index f9fa28f4eae4cd115b7265e7028ce457b9bb79bd..fed90902cd280ff9a9c4a4f32b8f35b480a4b4fb 100644 (file)
@@ -12,7 +12,7 @@ session.serialize_handler=php
 error_reporting(E_ALL);
 
 class foo {
-       var $bar = "ok";
+       public $bar = "ok";
        function method() { $this->yes++; }
 }
 
index 79383705e65085dcc696af12b8366e99b05c986b..2040476bc0e2bd370737e1283287b917d3630251 100644 (file)
@@ -13,7 +13,7 @@ session.serialize_handler=php
 error_reporting(E_ALL);
 
 class handler {
-       var $data = 'baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}}';
+       public $data = 'baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}}';
     function open($save_path, $session_name)
     {
         print "OPEN: $session_name\n";
@@ -48,7 +48,7 @@ class handler {
 $hnd = new handler;
 
 class foo {
-    var $bar = "ok";
+    public $bar = "ok";
     function method() { $this->yes++; }
 }
 
index 6127ad22f2cba3c4c18bb834f67c22589aa85c85..5638376b9d59d310443ade6e4082dd7e85b68b7c 100644 (file)
@@ -14,7 +14,7 @@ session.serialize_handler=php
 error_reporting(E_ALL);
 
 class handler {
-       var $data = 'baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}}';
+       public $data = 'baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}}';
     function open($save_path, $session_name)
     {
         print "OPEN: $session_name\n";
@@ -50,7 +50,7 @@ class handler {
 $hnd = new handler;
 
 class foo {
-    var $bar = "ok";
+    public $bar = "ok";
     function method() { $this->yes++; }
 }
 
index d93474765d4155acb4e9d39d8d7ba70ecacee1e8..fb355976fbc6ddd984e1cd56a7f47b5581123a1c 100644 (file)
@@ -15,11 +15,11 @@ session_id("abtest");
 session_start();
 
 class a {
-    var $test = "hallo";
+    public $test = "hallo";
 }
  
 class b {
-    var $a;
+    public $a;
     function b(&$a) {
         $this->a = &$a;
     }
index 0e274b1536ce81c023e766e94d176fb841266c93..c258d3ba5798d17fd77a83e44f64378c0b138d89 100644 (file)
@@ -13,7 +13,7 @@ session.serialize_handler=php
 error_reporting(E_ALL);
 
 class TFoo {
-       var $c;
+       public $c;
        function TFoo($c) {
                $this->c = $c;
        }
index 89886559d1000c75e7c564684dc5234e0a25472d..1b2cfb17b8d3593de5f2a2b969401e43db19528f 100644 (file)
@@ -18,8 +18,8 @@ fopencookie detected and working (or cast mechanism works)
  */
 
 class userstream {
-       var $position = 0;
-       var $data = "If you can read this, it worked";
+       public $position = 0;
+       public $data = "If you can read this, it worked";
        
        function stream_open($path, $mode, $options, &$opened_path)
        {
index 1606d89f068b2d66df3fa90d729eefecb12c1161..124825f24ed54c23709c1a4ead230a3f8ec03e12 100644 (file)
@@ -82,12 +82,12 @@ class uselessstream
 
 class mystream 
 {
-       var $path;
-       var $mode;
-       var $options;
+       public $path;
+       public $mode;
+       public $options;
 
-       var $position;
-       var $varname;
+       public $position;
+       public $varname;
 
        function stream_open($path, $mode, $options, &$opened_path)
        {
index af2003f3e39bb31deb47aefeda4006fb97bae0e4..29eeb2ee6c721d846817b194b622d75a5409573a 100644 (file)
@@ -4,7 +4,7 @@ Bug #21957 (serialize() mangles objects with __sleep)
 <?php 
 class test
 {
-       var $a, $b;
+       public $a, $b;
 
        function test()
        {
index e3e4d73e32cb2d38a0dcabc56aa2b4c073e7d0fa..b1493f57297417df71d8390c5553bda71365e451 100755 (executable)
@@ -163,7 +163,7 @@ $ini_overwrites = array(
                'safe_mode=0',
                'disable_functions=',
                'output_buffering=Off',
-               'error_reporting=2047',
+               'error_reporting=4095',
                'display_errors=1',
                'log_errors=0',
                'html_errors=0',
index 9a2306250cdb5a2b69b1d9c814c2bea5effbab1f..f9708e04f1cc7b6f60eb8e8cf96b07c818e2b6d6 100644 (file)
@@ -6,7 +6,7 @@ ZE2 __call()
 <?php
 
 class Caller {
-       var $x = array(1, 2, 3);
+       public $x = array(1, 2, 3);
        
        function __call($m, $a) {
                echo "Method $m called:\n";
index 61aa90661e9b568dbedf18d8bef8bfbe956d0c54..a49d62f3fe33d357d9fb8b1ff8235cd154ed571d 100644 (file)
@@ -8,13 +8,13 @@ define('FOO2', 2);
 
 class A {
     
-    var $a_var = array(FOO1=>'foo1_value', FOO2=>'foo2_value');
+    public $a_var = array(FOO1=>'foo1_value', FOO2=>'foo2_value');
     
 }
 
 class B extends A {
  
-    var $b_var = 'foo';   
+    public $b_var = 'foo';   
             
 }
 
index 1c62b5bd4a9779090db309375af24c8ca397d2fb..fedf8e5d245ab9a1977a59c2c572d435e3f477f7 100644 (file)
@@ -3,7 +3,7 @@ Bug #24399 (is_subclass_of() crashes when parent class doesn't exist)
 --FILE--
 <?php
 class dooh {
-    var $blah;
+    public $blah;
 }
 $d = new dooh;
 var_dump(is_subclass_of($d, 'dooh'));
index 0e3ae3c338dc97c5e0c13c5aaa509a6d516b8a2b..621958b1bd23ff65a7cdb72e9751d403df593c36 100644 (file)
@@ -7,7 +7,7 @@ Classes general test
 /* pretty nifty object oriented code! */
 
 class user {
-  var $first_name,$family_name,$address,$phone_num;
+  public $first_name,$family_name,$address,$phone_num;
   function display()
   {
     echo "User information\n";
index d2afc2aa2c27aad511b6896e662095da7022d975..b55e7fe94da34829987a5eb2c189bdc5f1cc38e0 100755 (executable)
@@ -3,10 +3,10 @@ Destucting and references
 --FILE--
 <?php
 
-class test1 {var $x;};
-class test2 {var $x;};
-class test3 {var $x;};
-class test4 {var $x;};
+class test1 {public $x;};
+class test2 {public $x;};
+class test3 {public $x;};
+class test4 {public $x;};
 
 $o1 = new test1;
 $o2 = new test2;
index d5544a4f7750b6c66e1d8b7c87161f7001dbefe1..070ad9147d7c759da70c23a029f75ccb4dfa3c94 100644 (file)
@@ -6,8 +6,8 @@ Classes inheritance test
 /* Inheritance test.  Pretty nifty if I do say so myself! */
 
 class foo {
-  var $a;
-  var $b;
+  public $a;
+  public $b;
   function display() {
        echo "This is class foo\n";
     echo "a = ".$this->a."\n";
@@ -19,7 +19,7 @@ class foo {
 };
 
 class bar extends foo {
-  var $c;
+  public $c;
   function display() {  /* alternative display function for class bar */
     echo "This is class bar\n";
     echo "a = ".$this->a."\n";
index fa190c767abfdb57ac2e2b2cab3c29fd05a5b555..dbc23de75453b5a76efedfb3558729bd85ab6839 100644 (file)
@@ -30,7 +30,7 @@ interface if_f extends if_e implements if_a, if_b, if_c, if_d, if_e {
 
 class base {
        function test($class) {
-               echo "is_a(" . get_class($this) . ", $class) ". (is_a($this, $class) ? "yes\n" : "no\n");
+               echo "is_a(" . get_class($this) . ", $class) ". (($this instanceof $class) ? "yes\n" : "no\n");
        }
 }
 
index 4d101762fc3ac6b46e86357953972067b2f90533..0f5e5cbe7b035d182554c5038dd8f9fea5b54557 100644 (file)
@@ -15,7 +15,7 @@ interface if_b extends if_a {
 
 class base {
        function _is_a($sub) {
-               echo 'is_a('.get_class($this).', '.$sub.') = '.(is_a($this, $sub) ? 'yes' : 'no')."\n";
+               echo 'is_a('.get_class($this).', '.$sub.') = '.(($this instanceof $sub) ? 'yes' : 'no')."\n";
        }
        function test() {
                echo $this->_is_a('base');
index 91ff17af1dbd7720551ee5ea19b23ae4b5ab8cb2..329c0728b54150413a1dcc5f5c87c308801c211a 100644 (file)
@@ -6,7 +6,7 @@ ZE2 An interface cannot have properties
 <?php
 
 interface if_a {
-       var $member;
+       public $member;
 }
 ?>
 --EXPECTF--
index 360d19e10b3077cbb3b7d0d528520ec23928ffd9..74acb5de1360ddd023e67875ec66eee859280b90 100644 (file)
@@ -6,7 +6,7 @@ ZE2 object references
 <?php
 
 class Foo {
-       var $name;
+       public $name;
     
        function Foo() {
                $this->name = "I'm Foo!\n";
index f81011cf6f0fce894b89b536b14106c6f8cfde10..643b0695ee755906dcb1dbf3d3bc58e059a67583 100644 (file)
@@ -9,7 +9,7 @@ class Test {
 }
 
 class Factory {
-       var $name = "Test";
+       public $name = "Test";
        function create() {
                $obj = new $this->name; /* Parse error */
                return $obj;
index eb2e8d2ce3c2b64ccdb053ec202d1e6c29e88181..24581d663e8c24205536a10fe9c2fff48fb1da43 100644 (file)
@@ -7,7 +7,7 @@ Bug #21961 (get_parent_class() segfault)
 
 class man
 {
-       var $name, $bars;
+       public $name, $bars;
        function man()
        {
                $this->name = 'Mr. X';
@@ -27,7 +27,7 @@ class man
 
 class bar extends man
 {
-       var $name;
+       public $name;
 
        function bar($w)
        {
index 91e5b2a44b220621a1370266091c6b62ef1931a7..84142b01ff4ad298c07fc62493f095ca460059c3 100644 (file)
@@ -3,7 +3,7 @@ Bug #22231 (segfault when returning a global variable by reference)
 --FILE--
 <?php
 class foo {
-    var $fubar = 'fubar';
+    public $fubar = 'fubar';
 }
 
 function &foo(){
index acc93e1ef55a1c3be292877a040ed83575fffa95..5b142b4b001657270c991618f5fe99bd97dc6059 100644 (file)
@@ -4,7 +4,7 @@ Bug #22367 (weird zval allocation problem)
 <?php
 class foo
 {
-       var $test = array(0, 1, 2, 3, 4); 
+       public $test = array(0, 1, 2, 3, 4); 
 
        function a($arg) {
                var_dump(array_key_exists($arg, $this->test));
@@ -31,8 +31,8 @@ class foo
 
 class bar extends foo
 {
-       var $i = 0;
-       var $idx;
+       public $i = 0;
+       public $idx;
 
        function bar($idx) {
                $this->idx = $idx;
index 24bed4333965c7ce1b4af05d4e5919c2ad0ff2f9..5c05a82f301e551a630e48bbdf1388dfdeff210d 100644 (file)
@@ -4,7 +4,7 @@ Bug #22510 (segfault among complex references)
 <?php
 class foo 
 {
-       var $list = array();
+       public $list = array();
 
        function finalize() {
                print __CLASS__."::".__FUNCTION__."\n";
index 9d383837a41a78c0bbb5fde65782394d20f6b1a6..1fc6e548ff0b41ef93286cca79526c567a6e9439 100644 (file)
@@ -4,7 +4,7 @@ Bug #23922 (scope doesn't properly propagate into internal functions)
 <?php
   class foo
   {
-    var $foo = 1;
+    public $foo = 1;
 
     function as_string()
     { assert('$this->foo == 1'); }
index 2acc54cf08c9c4ffa108b7835b82caf4a9dfb617..fe99257d3d3ae89af426cea17ec41fd235cafc6d 100644 (file)
@@ -4,7 +4,7 @@ Bug #24403 (scope doesn't properly propagate into internal functions)
 <?php
 class a
 {
-       var $a = array();
+       public $a = array();
 
        function a()
        {
index cf0cc1a265ce42f05d56e859be486f200334e8fc..09cfc181977b057eb35916928de798a74b560640 100755 (executable)
@@ -8,7 +8,7 @@ Bug #25652 (Calling Global functions dynamically fails from Class scope)
        }
        
        class foo {
-               var $arr = array('testfunc');
+               public $arr = array('testfunc');
                function bar () {
                        $this->arr[0]('testvalue');
                }
index 480d1469a0a3dd863fe610a5d3af991018d10424..7d613f812e1af77dd5a4c28154b0dbf792bde977 100644 (file)
@@ -1,7 +1,7 @@
 --TEST--
 Bug #26182 (Object properties created redundantly)
 --INI--
-error_reporting=2039
+error_reporting=4095
 --FILE--
 <?php
 
index 65459f8f86ed54355cbb74236bb9558dc631f1fb..b54cbc50e65b650736cdd98d883f63482c510de8 100644 (file)
@@ -24,7 +24,7 @@ var_dump($php_errormsg);
 ?>
 --EXPECTF--
 string(1) "1"
-string(4) "2047"
+string(4) "4095"
 string(1) "0"
 string(1) "1"
 string(1) "0"
index d595b2592b944cf3aba607824fc9743bd553e458..14fff59bd8876787ed7027b62caa2c4cfd7a262c 100644 (file)
@@ -25,7 +25,7 @@ var_dump($php_errormsg);
 --EXPECTF--
 %s: %sivision by zero in %s on line %d
 string(1) "1"
-string(4) "2047"
+string(4) "4095"
 string(1) "0"
 string(1) "1"
 string(1) "0"
index 04a3c7116865b9410208262db1f25bc1deaed16f..7916ff2352b1271ca78ce704012f07b02719c01f 100644 (file)
@@ -24,7 +24,7 @@ var_dump($php_errormsg);
 ?>
 --EXPECTF--
 string(1) "1"
-string(4) "2047"
+string(4) "4095"
 string(1) "0"
 string(1) "1"
 string(1) "0"