3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler( static fn (int $errno, string $errstr): bool => $errstr === 'Trying to access array offset on value of type null' ); echo null[1]; echo "foo"[4];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SgZ7f0
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'set_error_handler'
    4     1        DECLARE_LAMBDA_FUNCTION                          ~0      [0]
    6     2        SEND_VAL                                                 ~0
    3     3        DO_ICALL                                                 
    8     4        FETCH_DIM_R                                      ~2      null, 1
          5        ECHO                                                     ~2
    9     6        FETCH_DIM_R                                      ~3      'foo', 4
          7        ECHO                                                     ~3
          8      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SgZ7f0
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $errno, !1 = $errstr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        IS_IDENTICAL                                     ~2      !1, 'Trying+to+access+array+offset+on+value+of+type+null'
          3        VERIFY_RETURN_TYPE                                       ~2
          4      > RETURN                                                   ~2
    6     5*       VERIFY_RETURN_TYPE                                       
          6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.48 ms | 999 KiB | 14 Q