com php-src: test to function forward_static_call_array ();: ext/standard/tests/forward_static_call_arr ay.phpt
| From: | Joe Watkins | Date: | Thu, 01 Jun 2017 07:19:26 +0000 |
| Subject: | com php-src: test to function forward_static_call_array ();: ext/standard/tests/forward_static_call_arr ay.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-97976@lists.php.net to get a copy of this message | ||
Commit: 6a12b52406df421f4e8df9a626cdc770279a0890
Author: marcosptf <marcosptf@yahoo.com.br> Sun, 13 Mar 2016 03:12:23 -0300
Committer: Joe Watkins <krakjoe@php.net> Thu, 1 Jun 2017 08:19:26 +0100
Parents: 7a7e0f7da08b83a03a3e307ae135c31e695e9b99
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6a12b52406df421f4e8df9a626cdc770279a0890
Log:
test to function forward_static_call_array();
was added new test to standard function;
Changed paths:
A ext/standard/tests/forward_static_call_array.phpt
Diff:
diff --git a/ext/standard/tests/forward_static_call_array.phpt
b/ext/standard/tests/forward_static_call_array.phpt
new file mode 100644
index 0000000..a135a71
--- /dev/null
+++ b/ext/standard/tests/forward_static_call_array.phpt
@@ -0,0 +1,47 @@
+--TEST--
+mixed forward_static_call_array ( callable $function , array $parameters );
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - @phpsp - sao paulo - br
+--SKIPIF--
+<?php
+if (phpversion() < "5.3.0") {
+ die('SKIP php version so lower.');
+}
+?>
+--FILE--
+<?php
+
+function test() {
+ $args = func_get_args();
+ echo "C " . join(',', $args) . " \n";
+}
+
+class A {
+
+ const NAME = 'A';
+
+ public static function test() {
+ $args = func_get_args();
+ echo static::NAME, " " . join(',', $args) . " \n";
+ }
+
+}
+
+class B extends A {
+
+ const NAME = 'B';
+
+ public static function test() {
+ echo self::NAME, "\n";
+ forward_static_call_array(array('A', 'test'), array('more',
'args'));
+ forward_static_call_array('test', array('other', 'args'));
+ }
+
+}
+
+B::test('foo');
+?>
+--EXPECT--
+B
+B more,args
+C other,args