3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f(?int $x = null) { echo $x ? 'Present' . $x : 'Not present'; } f(); echo PHP_EOL; f(1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k91J6
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'f'
          1        DO_FCALL                                      0          
    8     2        ECHO                                                     '%0A'
    9     3        INIT_FCALL                                               'f'
          4        SEND_VAL                                                 1
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 5
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k91J6
function name:  f
number of ops:  8
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      null
    4     1      > JMPZ                                                     !0, ->5
          2    >   CONCAT                                           ~1      'Present', !0
          3        QM_ASSIGN                                        ~2      ~1
          4      > JMP                                                      ->6
          5    >   QM_ASSIGN                                        ~2      'Not+present'
          6    >   ECHO                                                     ~2
    5     7      > RETURN                                                   null

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.28 ms | 1397 KiB | 15 Q