3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public $a = 5; } class Test2 { public function getA() { return NULL; } } $test = new Test2(); var_dump($test->getA()->a ?? 'leda hovno');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H2oN8
function name:  (null)
number of ops:  12
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'Test2'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'getA'
          5        DO_FCALL                                      0  $4      
          6        FETCH_OBJ_IS                                     ~5      $4, 'a'
          7        COALESCE                                         ~6      ~5
          8        QM_ASSIGN                                        ~6      'leda+hovno'
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Class Test: [no user functions]
Class Test2:
Function geta:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H2oN8
function name:  getA
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   null
   11     1*     > RETURN                                                   null

End of function geta

End of class Test2.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.94 ms | 1394 KiB | 15 Q