/PHP-8.0/Zend/ |
H A D | zend_gc.c | 338 if (EXPECTED(GC_GET_PTR(root->ref) == ref)) { in gc_decompress() 346 if (GC_GET_PTR(root->ref) == ref) { in gc_decompress() 395 ref, GC_REFCOUNT(ref), GC_REF_ADDRESS(ref), in gc_trace_ref() 401 ref, GC_REFCOUNT(ref), GC_REF_ADDRESS(ref), in gc_trace_ref() 406 ref, GC_REFCOUNT(ref), GC_REF_ADDRESS(ref), in gc_trace_ref() 614 newRoot->ref = ref; /* GC_ROOT tag is 0 */ in gc_possible_root_when_full() 650 newRoot->ref = ref; /* GC_ROOT tag is 0 */ in gc_possible_root() 750 ref = Z_COUNTED(((zend_reference*)ref)->val); in gc_scan_black() 1150 buf->ref = GC_MAKE_GARBAGE(ref); in gc_add_garbage() 1318 ref = current->ref; in gc_collect_roots() [all …]
|
H A D | zend_gc.h | 34 ZEND_API void ZEND_FASTCALL gc_possible_root(zend_refcounted *ref); 35 ZEND_API void ZEND_FASTCALL gc_remove_from_buffer(zend_refcounted *ref); 65 #define GC_MAY_LEAK(ref) \ argument 66 ((GC_TYPE_INFO(ref) & \ 69 static zend_always_inline void gc_check_possible_root(zend_refcounted *ref) in gc_check_possible_root() argument 71 if (EXPECTED(GC_TYPE_INFO(ref) == GC_REFERENCE)) { in gc_check_possible_root() 72 zval *zv = &((zend_reference*)ref)->val; in gc_check_possible_root() 77 ref = Z_COUNTED_P(zv); in gc_check_possible_root() 79 if (UNEXPECTED(GC_MAY_LEAK(ref))) { in gc_check_possible_root() 80 gc_possible_root(ref); in gc_check_possible_root()
|
H A D | zend_variables.c | 34 static void ZEND_FASTCALL zend_reference_destroy(zend_reference *ref); 35 static void ZEND_FASTCALL zend_empty_destroy(zend_reference *ref); 71 static void ZEND_FASTCALL zend_reference_destroy(zend_reference *ref) in zend_reference_destroy() argument 73 ZEND_ASSERT(!ZEND_REF_HAS_TYPE_SOURCES(ref)); in zend_reference_destroy() 74 i_zval_ptr_dtor(&ref->val); in zend_reference_destroy() 75 efree_size(ref, sizeof(zend_reference)); in zend_reference_destroy() 78 static void ZEND_FASTCALL zend_empty_destroy(zend_reference *ref) in zend_empty_destroy() argument 91 zend_refcounted *ref = Z_COUNTED_P(zval_ptr); in zval_internal_ptr_dtor() local 93 if (GC_DELREF(ref) == 0) { in zval_internal_ptr_dtor() 95 zend_string *str = (zend_string*)ref; in zval_internal_ptr_dtor()
|
/PHP-8.0/ext/reflection/tests/ |
H A D | ReflectionGenerator_in_Generator.phpt | 8 call($ref, $method, false); 11 var_dump($ref->$method()); 15 call($ref, "getTrace"); 16 call($ref, "getExecutingLine"); 17 call($ref, "getExecutingFile"); 18 call($ref, "getExecutingGenerator"); 19 call($ref, "getFunction"); 20 call($ref, "getThis"); 26 doCalls($ref); 28 yield from (function() use ($ref) { [all …]
|
H A D | 006.phpt | 18 $ref = new ReflectionClass('Test'); 24 var_dump($ref->getStaticPropertyValue($name)); 25 var_dump($ref->getStaticPropertyValue($name)); 26 $ref->setStaticPropertyValue($name, 'updated'); 27 var_dump($ref->getStaticPropertyValue($name)); 45 $ref = new ReflectionClass('Test'); 64 $ref = new ReflectionClass('Test'); 70 var_dump($ref->getStaticPropertyValue($name)); 71 var_dump($ref->getStaticPropertyValue($name)); 72 $ref->setStaticPropertyValue($name, 'updated'); [all …]
|
H A D | bug78895.phpt | 19 $ref = new ReflectionClass(Foo::class); 20 var_dump(Reflection::getModifierNames($ref->getModifiers())); 21 $ref = new ReflectionClass(I::class); 22 var_dump(Reflection::getModifierNames($ref->getModifiers())); 23 $ref = new ReflectionClass(T::class); 24 var_dump(Reflection::getModifierNames($ref->getModifiers())); 25 $ref = new ReflectionClass(Bar::class); 26 var_dump(Reflection::getModifierNames($ref->getModifiers()));
|
H A D | ReflectionGenerator_basic.phpt | 26 $ref = new ReflectionGenerator($gen); 28 var_dump($ref->getTrace()); 29 var_dump($ref->getExecutingLine()); 30 var_dump($ref->getExecutingFile()); 31 var_dump($ref->getExecutingGenerator()); 32 var_dump($ref->getFunction()); 33 var_dump($ref->getThis());
|
/PHP-8.0/Zend/tests/ |
H A D | bug72598_2.phpt | 5 function ref(&$ref) { 6 var_dump($ref); 7 $ref = 1; 17 call_user_func_array('ref', $a); 23 Warning: ref(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d 26 Warning: ref(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
|
H A D | qm_assign_ref_unwrap_leak.phpt | 6 function &ref() { 12 var_dump(true ? ref() : ref()); 13 var_dump(ref() ?: ref()); 14 var_dump(ref() ?? ref());
|
H A D | bug72598.phpt | 5 function ref(&$ref) { 6 var_dump($ref); 14 call_user_func_array('ref', $a); 20 Warning: ref(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d 24 Warning: ref(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
|
H A D | call_user_func_006.phpt | 8 function bar(&$ref) { 9 $ref = 24; 13 $ref =& $x; 18 $ref =& $y; 24 Warning: Foo\bar(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d 27 Warning: Foo\bar(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
|
H A D | assign_obj_ref_return.phpt | 7 $obj->ref =& $ref; 8 $obj->val = $obj->ref = 42; 14 ["ref"]=>
|
/PHP-8.0/Zend/tests/attributes/ |
H A D | 011_inheritance.phpt | 24 $ref = new \ReflectionClass(C1::class); 25 print_r(array_map(fn ($a) => $a->getName(), $ref->getAttributes())); 26 print_r(array_map(fn ($a) => $a->getName(), $ref->getMethod('foo')->getAttributes())); 28 $ref = new \ReflectionClass(C2::class); 29 print_r(array_map(fn ($a) => $a->getName(), $ref->getAttributes())); 30 print_r(array_map(fn ($a) => $a->getName(), $ref->getMethod('foo')->getAttributes())); 32 $ref = new \ReflectionClass(C3::class); 33 print_r(array_map(fn ($a) => $a->getName(), $ref->getAttributes())); 56 $ref = new \ReflectionClass(T1::class); 59 $ref = new \ReflectionClass(C4::class); [all …]
|
H A D | 006_filter.phpt | 6 $ref = new \ReflectionFunction(#[A1] #[A2] function () { }); 7 $attr = $ref->getAttributes(A3::class); 11 $ref = new \ReflectionFunction(#[A1] #[A2] function () { }); 12 $attr = $ref->getAttributes(A2::class); 16 $ref = new \ReflectionFunction(#[A1] #[A2] #[A2] function () { }); 17 $attr = $ref->getAttributes(A2::class); 33 $ref = new \ReflectionFunction(#[A1] #[A2] function () { }); 38 $ref = new \ReflectionFunction(#[A1] #[A2] function () { }); 55 $ref = new \ReflectionFunction(function () { }); 58 $ref->getAttributes(A1::class, 3); [all …]
|
H A D | 013_class_scope.phpt | 19 $ref = new \ReflectionClass(C1::class); 20 print_r($ref->getAttributes()[0]->getArguments()); 22 print_r($ref->getProperty('a')->getAttributes()[0]->getArguments()); 23 print_r($ref->getMethod('bar')->getAttributes()[0]->getArguments()); 41 $ref = new \ReflectionClass(C2::class); 44 $ref = new \ReflectionClass(T1::class); 45 $attr = $ref->getMethod('foo')->getAttributes()[0]; 70 $ref = new \ReflectionObject(C3::foo()); 72 $args = $ref->getAttributes()[0]->getArguments(); 73 var_dump($args[0] == $ref->getName(), $args[1]); [all …]
|
H A D | 005_objects.phpt | 21 foreach ($ref->getAttributes() as $attr) { 29 $ref = new \ReflectionFunction(#[A1] function () { }); 32 $ref->getAttributes()[0]->newInstance(); 42 $ref->getAttributes()[0]->newInstance(); 49 $ref = new \ReflectionFunction(#[A2] function () { }); 52 $ref->getAttributes()[0]->newInstance(); 65 $ref = new \ReflectionFunction(#[A3] function () { }); 68 $ref->getAttributes()[0]->newInstance(); 81 $ref->getAttributes()[0]->newInstance(); 90 $ref = new \ReflectionFunction(#[A5] function () { }); [all …]
|
H A D | 003_ast_nodes.phpt | 14 $ref = new \ReflectionClass(C1::class); 15 $attr = $ref->getAttributes(); 26 $ref = new \ReflectionClass(C2::class); 27 $attr = $ref->getAttributes(); 44 $ref = new \ReflectionClass(C3::class); 45 $attr = $ref->getAttributes(); 57 $ref = new \ReflectionClass(C4::class); 58 var_dump($ref->getAttributes()[0]->getArguments()); 68 $ref = new \ReflectionFunction(#[C5(MissingClass::SOME_CONST)] function () { }); 69 $attr = $ref->getAttributes();
|
H A D | 017_closure_scope.phpt | 21 $ref = new \ReflectionFunction(C1::foo()); 22 print_r($ref->getAttributes()[0]->getArguments()); 23 print_r($ref->getParameters()[0]->getAttributes()[0]->getArguments()); 27 $ref = new \ReflectionFunction(C1::foo()->bindTo(null, Test1::class)); 28 print_r($ref->getAttributes()[0]->getArguments()); 29 print_r($ref->getParameters()[0]->getAttributes()[0]->getArguments());
|
/PHP-8.0/Zend/tests/type_declarations/ |
H A D | typed_properties_078.phpt | 12 $ref = &$a->it; 13 $a->a = &$ref; 15 var_dump($ref); 18 $a->t = &$ref; 20 var_dump($ref); 23 var_dump($ref); 26 $ref = new ArrayIterator(); 32 $ref = null; 34 $a->t = &$ref; 37 $ref = []; [all …]
|
H A D | typed_properties_reference_coercion_leak.phpt | 12 $ref = ""; 13 $test->x =& $ref; 14 $test->y =& $ref; 16 $ref = $val; 17 var_dump($ref, $val);
|
H A D | return_separation.phpt | 8 $ref =& $array; 9 unset($ref); 15 $ref =& $int; 16 unset($ref);
|
/PHP-8.0/ext/standard/tests/class_object/ |
H A D | get_object_vars_variation_002.phpt | 9 $obj->ref = &$a; 15 $arr['ref'] = 'changed.ref'; 24 ["ref"]=> 30 ["ref"]=> 31 &string(11) "changed.ref" 36 ["ref"]=> 37 &string(11) "changed.ref" 41 string(11) "changed.ref"
|
/PHP-8.0/Zend/tests/nullsafe_operator/ |
H A D | 016.phpt | 10 function set(&$ref, $value) { 11 $ref = $value; 32 set(): Argument #1 ($ref) cannot be passed by reference 33 set(): Argument #1 ($ref) cannot be passed by reference 34 set(): Argument #1 ($ref) cannot be passed by reference 35 set(): Argument #1 ($ref) cannot be passed by reference
|
/PHP-8.0/Zend/tests/weakrefs/ |
H A D | weakmap_multiple_weakrefs.phpt | 8 $ref = WeakReference::create($obj); 15 var_dump($ref === WeakReference::create($obj)); 16 var_dump($ref->get(), $map, $map2, $map3); 18 var_dump($ref->get(), $map, $map2, $map3); 19 unset($ref, $map, $map2); 22 $ref = WeakReference::create($obj); 29 unset($ref, $map, $map2, $map3);
|
/PHP-8.0/tests/lang/ |
H A D | returnByReference.006.phpt | 21 echo "\n---> 1. Via a return by ref function call, assign by reference the return value of a functi… 28 …\n---> 2. Via a return by ref function call, assign by reference the return value of a function th… 35 echo "\n---> 3. Via a return by ref function call, assign by reference the return value of a functi… 44 ---> 1. Via a return by ref function call, assign by reference the return value of a function that … 50 ---> 2. Via a return by ref function call, assign by reference the return value of a function that … 56 ---> 3. Via a return by ref function call, assign by reference the return value of a function that …
|