3v4l.org

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

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

End of function getbar

End of class ack.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.79 ms | 1395 KiB | 15 Q