3v4l.org

run code in 300+ PHP versions simultaneously
<?php function coalesce() { foreach (func_get_args() as $arg) { if (null !== $arg) { return $arg; } } return null; } var_dump(coalesce(null, 1, null));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z1TZ0
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'coalesce'
          2        SEND_VAL                                                 null
          3        SEND_VAL                                                 1
          4        SEND_VAL                                                 null
          5        DO_FCALL                                      0  $0      
          6        SEND_VAR                                                 $0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function coalesce:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 8
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/Z1TZ0
function name:  coalesce
number of ops:  11
compiled vars:  !0 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   FUNC_GET_ARGS                                    ~1      
          1      > FE_RESET_R                                       $2      ~1, ->8
          2    > > FE_FETCH_R                                               $2, !0, ->8
    5     3    >   TYPE_CHECK                                  1020          !0
          4      > JMPZ                                                     ~3, ->7
    6     5    >   FE_FREE                                                  $2
          6      > RETURN                                                   !0
    4     7    > > JMP                                                      ->2
          8    >   FE_FREE                                                  $2
    9     9      > RETURN                                                   null
   10    10*     > RETURN                                                   null

End of function coalesce

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.53 ms | 1398 KiB | 16 Q