3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = '012345'; var_dump(['Error'=>ord('0')!==ord($s[0]), ord('0'), ord($s[0]), PHP_VERSION, PHP_SAPI]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1mWsb
function name:  (null)
number of ops:  19
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '012345'
    4     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'ord'
          3        FETCH_DIM_R                                      ~2      !0, 0
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                         $3      
          6        IS_NOT_IDENTICAL                                 ~4      $3, 48
          7        INIT_ARRAY                                       ~5      ~4, 'Error'
          8        ADD_ARRAY_ELEMENT                                ~5      48
          9        INIT_FCALL                                               'ord'
         10        FETCH_DIM_R                                      ~6      !0, 0
         11        SEND_VAL                                                 ~6
         12        DO_ICALL                                         $7      
         13        ADD_ARRAY_ELEMENT                                ~5      $7
         14        ADD_ARRAY_ELEMENT                                ~5      '8.0.0'
         15        ADD_ARRAY_ELEMENT                                ~5      'cli'
         16        SEND_VAL                                                 ~5
         17        DO_ICALL                                                 
    5    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.97 ms | 1394 KiB | 17 Q