Home
last modified time | relevance | path

Searched refs:instance (Results 1 – 25 of 772) sorted by relevance

12345678910>>...31

/PHP-7.1/Zend/tests/
H A Dbug68652.phpt7 private static $instance;
9 if (isset(self::$instance)) {
10 return self::$instance;
12 return self::$instance = new self();
22 private static $instance;
24 if (isset(self::$instance)) {
25 return self::$instance;
27 return self::$instance = new self();
31 if (!isset(self::$instance)) return;
40 Fatal error: Uncaught Error: Access to undeclared static property: Bar::$instance in %sbug68652.php…
H A Dclosure_043.phpt6 * a bound instance. It should also not be automatically converted
7 * to a non-static instance when attempting to bind one */
24 echo "After binding, null scope, no instance", "\n";
28 echo "After binding, null scope, with instance", "\n";
32 echo "After binding, with scope, no instance", "\n";
36 echo "After binding, with scope, with instance", "\n";
49 After binding, null scope, no instance
56 After binding, null scope, with instance
58 Warning: Cannot bind an instance to a static closure in %s on line %d
61 After binding, with scope, no instance
[all …]
H A Dcall_user_func_003.phpt7 static $instance;
9 if (is_null($instance)) {
10 $instance = function () {
15 return $instance;
27 [%u|b%"instance"]=>
H A Dbug34045.phpt7 private static $instance;
10 self::$instance = $this;
14 if (!(self::$instance instanceof BasicSingleton)) {
16 self::$instance = new $c;
18 return self::$instance;
H A Dbug32322.phpt2 Bug #32322 (Return values by reference broken( using self::),example singleton instance)
9 private static $instance = null;
20 if ( self::$instance == null )
22 self::$instance = new test('Singleton1');
25 echo "Using old class " . self::$instance -> myname . "\n";
27 return self::$instance;
51 echo "Try static instance inside class :\n";
57 echo "Try static instance inside function :\n";
67 Try static instance inside class :
73 Try static instance inside function :
H A Dclosure_044.phpt5 /* A non-static closure has a bound instance if it has a scope
6 * and doesn't have an instance if it has no scope */
24 echo "After binding, null scope, no instance", "\n";
28 echo "After binding, null scope, with instance", "\n";
32 echo "After binding, with scope, no instance", "\n";
36 echo "After binding, with scope, with instance", "\n";
49 After binding, null scope, no instance
56 After binding, null scope, with instance
63 After binding, with scope, no instance
70 After binding, with scope, with instance
H A Dclosure_059.phpt36 Exception: Argument 1 passed to {closure}() must be an instance of A, instance of B %s
37 Exception: Argument 1 passed to {closure}() must be an instance of A, instance of B %s
38 Exception: Argument 1 passed to {closure}() must be an instance of A, instance of B %s
H A Dbug69124.phpt11 function test(&$instance, &$method) {
12 $instance->{$method}();
15 $instance = new Foo;
18 test($instance, $method);
H A Dbug39721.phpt7 public $instance;
10 $this->instance = ++self::$instances;
25 echo $foo->instance . "\n";
26 echo $child->instance . "\n";
H A Dbug51176.phpt16 echo "instance\n";
30 instance
31 instance
32 instance
H A Dclosure_046.phpt8 * to having a bound instance. */
27 echo "After binding, no instance", "\n";
33 echo "After binding, with same-class instance for the bound one", "\n";
37 echo "After binding, with different instance for the bound one", "\n";
49 After binding, no instance
56 After binding, with same-class instance for the bound one
63 After binding, with different instance for the bound one
H A Dbug47165.phpt9 static $instance = null;
10 $instance = new Foo();
11 return $instance->bar;
/PHP-7.1/ext/date/tests/
H A Dtimezone_offset_get_variation1.phpt93 'instance of classWithToString' => new classWithToString(),
94 'instance of classWithoutToString' => new classWithoutToString(),
138 Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, float given
141 Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, float given
144 Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, float given
159 Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, null given
162 Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, null given
194 -- instance of classWithToString --
195 Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, instance of classWi…
197 -- instance of classWithoutToString --
[all …]
/PHP-7.1/tests/lang/
H A Dbug22510.phpt36 $this->instance = new foo();
37 $this->instance->method1($this);
38 $this->instance->method1($this);
43 $this->instance = new foo();
44 $this->instance->method2($this);
45 $this->instance->method2($this);
50 $this->instance = new foo();
82 $bar->instance->finalize();
85 $bar->instance->finalize();
88 $bar->instance->finalize();
[all …]
/PHP-7.1/ext/reflection/tests/
H A DReflectionObject_getConstants_basic.phpt20 echo "Reflecting on instance of class $class: \n";
27 Reflecting on instance of class C:
32 Reflecting on instance of class D:
37 Reflecting on instance of class E:
42 Reflecting on instance of class F:
47 Reflecting on instance of class X:
H A DReflectionObject_getConstant_basic.phpt20 echo "Reflecting on instance of class $class: \n";
27 Reflecting on instance of class C:
30 Reflecting on instance of class D:
33 Reflecting on instance of class E:
36 Reflecting on instance of class F:
39 Reflecting on instance of class X:
H A DReflectionProperty_getValue_error.phpt17 $instance = new TestClass();
25 var_dump($propInfo->getValue($instance, true));
34 var_dump($propInfo->getValue($instance, true));
42 var_dump($propInfo->getValue($instance));
48 echo "\n\nInvalid instance:\n";
80 Invalid instance:
82 Fatal error: Uncaught ReflectionException: Given object is not an instance of the class this proper…
/PHP-7.1/ext/pdo/tests/
H A Dpdo_036.phpt8 $instance = new reflectionclass('pdostatement');
9 $x = $instance->newInstance();
12 $instance = new reflectionclass('pdorow');
13 $x = $instance->newInstance();
/PHP-7.1/Zend/tests/closures/
H A Dclosure_from_callable_basic.phpt20 echo 'Access public instance method of object';
24 echo 'Access public instance method of parent object through parent:: ';
69 echo 'Access public instance method of parent object through "parent::" ';
74 echo 'Access public instance method of self object through "self::" ';
89 echo 'MagicCall __call instance method ';
104 Access public instance method of object OK
105 Access public instance method of parent object through parent:: OK
115 Access public instance method of parent object through "parent::" OK
116 Access public instance method of self object through "self::" OK
117 Access public instance method of parent object through "self::" to parent method OK
[all …]
/PHP-7.1/ext/intl/tests/
H A Dtimezone_equals_basic.phpt15 echo "Comparison to equal instance:\n";
17 echo "Comparison to equivalent instance:\n";
27 Comparison to equal instance:
29 Comparison to equivalent instance:
/PHP-7.1/ext/standard/tests/class_object/
H A Dget_declared_classes_variation1.phpt18 echo "\n-- before instance is declared --\n";
21 echo "\n-- after instance is declared --\n";
31 -- before instance is declared --
34 -- after instance is declared --
/PHP-7.1/tests/classes/
H A Dtype_hinting_004.phpt54 echo "in C::f1 (instance);\n";
61 echo "in C::f2 (instance);\n";
99 echo "\n\n---> Type hints with callback instance method:\n";
103 echo "in C::f1 (instance);\n";
110 echo "in C::f2 (instance);\n";
152 0: Argument 1 passed to f1() must be an instance of A, integer given%s(%d)
173 ---> Type hints with callback instance method:
176 in C::f1 (instance);
179 in C::f2 (instance);
180 in C::f2 (instance);
[all …]
H A Dstatic_properties_003_error1.phpt2 Attempting to access static properties using instance property syntax
10 echo "\n--> Access non-visible static prop like instance prop:\n";
15 --> Access non-visible static prop like instance prop:
H A Dstatic_properties_003_error2.phpt2 Attempting to access static properties using instance property syntax
10 echo "\n--> Access non-visible static prop like instance prop:\n";
15 --> Access non-visible static prop like instance prop:
/PHP-7.1/ext/openssl/tests/
H A DServerClientTestCase.inc29 private static $instance;
33 if (!isset(self::$instance)) {
34 self::$instance = new self($isWorker);
37 return self::$instance;
42 if (!isset(self::$instance)) {
43 self::$instance = $this;

Completed in 32 milliseconds

12345678910>>...31