3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(&$x) { try { $x = 'trying'; return $x; } finally { $x = 'finally'; } } $bar = 'main'; echo foo($bar) . $bar . PHP_EOL; $bar = foo($bar); echo $bar . $bar . PHP_EOL; function baz() { try { return 'trying'; } finally { return 'finally'; } } echo baz() . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/biO4e
function name:  (null)
number of ops:  19
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN                                                   !0, 'main'
   14     1        INIT_FCALL                                               'foo'
          2        SEND_REF                                                 !0
          3        DO_FCALL                                      0  $2      
          4        CONCAT                                           ~3      $2, !0
          5        CONCAT                                           ~4      ~3, '%0A'
          6        ECHO                                                     ~4
   16     7        INIT_FCALL                                               'foo'
          8        SEND_REF                                                 !0
          9        DO_FCALL                                      0  $5      
         10        ASSIGN                                                   !0, $5
   17    11        CONCAT                                           ~7      !0, !0
         12        CONCAT                                           ~8      ~7, '%0A'
         13        ECHO                                                     ~8
   28    14        INIT_FCALL                                               'baz'
         15        DO_FCALL                                      0  $9      
         16        CONCAT                                           ~10     $9, '%0A'
         17        ECHO                                                     ~10
   29    18      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 162) Position 1 = 7, Position 2 = 4
Branch analysis from position: 7
1 jumps found. (Code = 163) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/biO4e
function name:  foo
number of ops:  10
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    6     1        ASSIGN                                                   !0, 'trying'
    7     2        QM_ASSIGN                                        ~3      !0
          3      > FAST_CALL                                                ->7
          4    > > RETURN                                                   ~3
    8     5*       FAST_CALL                                                ->7
          6*       JMP                                                      ->9
    9     7    >   ASSIGN                                                   !0, 'finally'
          8      > FAST_RET                                                 
   11     9*     > RETURN                                                   null

End of function foo

Function baz:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 162) Position 1 = 4, Position 2 = 1
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 1
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/biO4e
function name:  baz
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E > > FAST_CALL                                                ->4
          1    > > RETURN                                                   'trying'
   23     2*       FAST_CALL                                                ->4
          3*       JMP                                                      ->7
   24     4    >   DISCARD_EXCEPTION                                        
          5      > RETURN                                                   'finally'
          6*       FAST_RET                                                 
   26     7*     > RETURN                                                   null

End of function baz

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.06 ms | 1442 KiB | 16 Q