3v4l.org

run code in 300+ PHP versions simultaneously
<?php function bar() { return null; } $x = bar() ?? 'default'; var_dump($x); $x = is_null(bar()) ? bar() : 'default';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MYkco
function name:  (null)
number of ops:  19
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'bar'
          1        DO_FCALL                                      0  $1      
          2        COALESCE                                         ~2      $1
          3        QM_ASSIGN                                        ~2      'default'
          4        ASSIGN                                                   !0, ~2
    9     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   11     8        INIT_FCALL                                               'bar'
          9        DO_FCALL                                      0  $5      
         10        TYPE_CHECK                                    2          $5
         11      > JMPZ                                                     ~6, ->16
         12    >   INIT_FCALL                                               'bar'
         13        DO_FCALL                                      0  $7      
         14        QM_ASSIGN                                        ~8      $7
         15      > JMP                                                      ->17
         16    >   QM_ASSIGN                                        ~8      'default'
         17    >   ASSIGN                                                   !0, ~8
         18      > RETURN                                                   1

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

End of function bar

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.64 ms | 1398 KiB | 18 Q