3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { static public function getNew() { return new static; } } $a = new Test(); $b = new Test(); $c = new $a; var_dump($a !== $b); var_dump($a !== $c);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XMKAI
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $3      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   12     3        NEW                                              $6      'Test'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $6
   13     6        FETCH_CLASS                                   0  $9      !0
          7        NEW                                              $10     $9
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !2, $10
   14    10        INIT_FCALL                                               'var_dump'
         11        IS_NOT_IDENTICAL                                 ~13     !0, !1
         12        SEND_VAL                                                 ~13
         13        DO_ICALL                                                 
   15    14        INIT_FCALL                                               'var_dump'
         15        IS_NOT_IDENTICAL                                 ~15     !0, !2
         16        SEND_VAL                                                 ~15
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Class Test:
Function getnew:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XMKAI
function name:  getNew
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                          static              $0      
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
    8     3*     > RETURN                                                   null

End of function getnew

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.95 ms | 1005 KiB | 14 Q