(no commit message) master
authorChristian Weiske <cweiske@cweiske.de>
Mon, 23 Feb 2015 21:38:56 +0000 (22:38 +0100)
committerwww-cweiske <www-cweiske@localhost.localdomain>
Mon, 23 Feb 2015 21:38:56 +0000 (22:38 +0100)
1-parent.php [new file with mode: 0644]
2-parent-output.txt [new file with mode: 0644]

diff --git a/1-parent.php b/1-parent.php
new file mode 100644 (file)
index 0000000..014ab3c
--- /dev/null
@@ -0,0 +1,31 @@
+<?php\r
+class A\r
+{\r
+    function __construct()\r
+    {\r
+        echo " A::__construct\n";\r
+    }\r
+}\r
+\r
+class B extends A\r
+{\r
+    function B()\r
+    {\r
+        echo "B::B\n";\r
+        $this->A();\r
+    }\r
+}\r
+\r
+class C extends A\r
+{\r
+    function C()\r
+    {\r
+        echo "C::C\n";\r
+        parent::__construct();\r
+    }\r
+}\r
+\r
+$c = new C();\r
+$b = new B();\r
+\r
+?>\r
diff --git a/2-parent-output.txt b/2-parent-output.txt
new file mode 100644 (file)
index 0000000..e1fe295
--- /dev/null
@@ -0,0 +1,7 @@
+$ php-5.6.3 6-parent.php \r
+C::C\r
+ A::__construct\r
+B::B\r
+PHP Fatal error:  Call to undefined method B::A() in /home/cweiske/Dev/pear/test/165/6-parent.php on line 15\r
+\r
+Fatal error: Call to undefined method B::A() in /home/cweiske/Dev/pear/test/165/6-parent.php on line 15\r