3v4l.org

run code in 300+ PHP versions simultaneously
<?php $meh = null; $foo = (bool) array_shift($meh); 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/InYQq
function name:  (null)
number of ops:  18
compiled vars:  !0 = $meh, !1 = $foo, !2 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, null
    4     1        INIT_FCALL                                               'array_shift'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                         $4      
          4        BOOL                                             ~5      $4
          5        ASSIGN                                                   !1, ~5
    5     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
    6     9        CAST                                          7  ~8      null
         10        ASSIGN                                                   !2, ~8
    7    11        INIT_FCALL                                               'var_dump'
         12        FETCH_DIM_R                                      ~10     !2, 0
         13        FETCH_OBJ_R                                      ~11     ~10, 'something'
         14        BOOL                                             ~12     ~11
         15        SEND_VAL                                                 ~12
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144 ms | 1394 KiB | 17 Q