3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Testi { public $temp; function __construct(string $testi){ $this->temp = $testi; } } $A = new class('') { private $name; function __construct(string $name) { $this->name = $name; } public function getName() : string { return $this->name; } }; $testiA = new Testi('A'); $testiB = new $testiA('B'); var_dump($testiA === $testiB);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WnpL4
function name:  (null)
number of ops:  19
compiled vars:  !0 = $A, !1 = $testiA, !2 = $testiB
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_ANON_CLASS                               <unknown> 
          1        NEW                                              $4      $3
          2        SEND_VAL_EX                                              ''
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $4
   25     5        NEW                                              $7      'Testi'
          6        SEND_VAL_EX                                              'A'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $7
   26     9        FETCH_CLASS                                   0  $10     !1
         10        NEW                                              $11     $10
         11        SEND_VAL_EX                                              'B'
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !2, $11
   28    14        INIT_FCALL                                               'var_dump'
         15        IS_IDENTICAL                                     ~14     !1, !2
         16        SEND_VAL                                                 ~14
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Class Testi:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WnpL4
function name:  __construct
number of ops:  4
compiled vars:  !0 = $testi
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ASSIGN_OBJ                                               'temp'
          2        OP_DATA                                                  !0
    7     3      > RETURN                                                   null

End of function __construct

End of class Testi.

Class class@anonymous:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WnpL4
function name:  __construct
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   15     1        ASSIGN_OBJ                                               'name'
          2        OP_DATA                                                  !0
   16     3      > RETURN                                                   null

End of function __construct

Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WnpL4
function name:  getName
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   FETCH_OBJ_R                                      ~0      'name'
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
   21     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function getname

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.23 ms | 1404 KiB | 15 Q