3v4l.org

run code in 300+ PHP versions simultaneously
<?php function output($output) { if ($output == 'error') { throw new \Exception('An error occurred.'); } echo "$output\n"; } @output('error'); @output('foo');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f3lDe
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   BEGIN_SILENCE                                    ~0      
          1        INIT_FCALL                                               'output'
          2        SEND_VAL                                                 'error'
          3        DO_FCALL                                      0          
          4        END_SILENCE                                              ~0
   13     5        BEGIN_SILENCE                                    ~2      
          6        INIT_FCALL                                               'output'
          7        SEND_VAL                                                 'foo'
          8        DO_FCALL                                      0          
          9        END_SILENCE                                              ~2
         10      > RETURN                                                   1

Function output:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f3lDe
function name:  output
number of ops:  11
compiled vars:  !0 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        IS_EQUAL                                                 !0, 'error'
          2      > JMPZ                                                     ~1, ->7
    6     3    >   NEW                                              $2      'Exception'
          4        SEND_VAL_EX                                              'An+error+occurred.'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $2
    9     7    >   NOP                                                      
          8        FAST_CONCAT                                      ~4      !0, '%0A'
          9        ECHO                                                     ~4
   10    10      > RETURN                                                   null

End of function output

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.07 ms | 1397 KiB | 15 Q