3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "3"; $hasPrefix = substr($a, 0, 1) == '_'; var_dump($hasPrefix); var_dump(intval($a));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Xt4u6
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a, !1 = $hasPrefix
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '3'
    4     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 1
          5        DO_ICALL                                         $3      
          6        IS_EQUAL                                         ~4      $3, '_'
          7        ASSIGN                                                   !1, ~4
    5     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
    6    11        INIT_FCALL                                               'var_dump'
         12        CAST                                          4  ~7      !0
         13        SEND_VAL                                                 ~7
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.48 ms | 1394 KiB | 17 Q