3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = (bool) array_shift(null); var_dump($foo); $bar = (array) null; var_dump((bool) $bar[0]->something);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a5P6V
function name:  (null)
number of ops:  17
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'array_shift'
          1        SEND_VAL_EX                                              null
          2        DO_ICALL                                         $2      
          3        BOOL                                             ~3      $2
          4        ASSIGN                                                   !0, ~3
    4     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
    5     8        CAST                                          7  ~6      null
          9        ASSIGN                                                   !1, ~6
    6    10        INIT_FCALL                                               'var_dump'
         11        FETCH_DIM_R                                      ~8      !1, 0
         12        FETCH_OBJ_R                                      ~9      ~8, 'something'
         13        BOOL                                             ~10     ~9
         14        SEND_VAL                                                 ~10
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.25 ms | 1394 KiB | 17 Q