3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar { function getBar() { return 'bar'; } function getFoo() { return !empty('foo'); } } $bar = empty((new Bar())->getBar()); $foo = (new Bar())->getFoo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Wh2np
function name:  (null)
number of ops:  12
compiled vars:  !0 = $bar, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $2      'Bar'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $2, 'getBar'
          3        DO_FCALL                                      0  $4      
          4        BOOL_NOT                                         ~5      $4
          5        ASSIGN                                                   !0, ~5
   16     6        NEW                                              $7      'Bar'
          7        DO_FCALL                                      0          
          8        INIT_METHOD_CALL                                         $7, 'getFoo'
          9        DO_FCALL                                      0  $9      
         10        ASSIGN                                                   !1, $9
         11      > RETURN                                                   1

Class Bar:
Function getbar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Wh2np
function name:  getBar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'bar'
    7     1*     > RETURN                                                   null

End of function getbar

Function getfoo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Wh2np
function name:  getFoo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   <true>
   12     1*     > RETURN                                                   null

End of function getfoo

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.06 ms | 1393 KiB | 13 Q