3v4l.org

run code in 300+ PHP versions simultaneously
<?php $t = 10; $d = '0'.$t; echo $d."\r\n"; echo substr($d,-2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QLpi0
function name:  (null)
number of ops:  11
compiled vars:  !0 = $t, !1 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 10
    3     1        CONCAT                                           ~3      '0', !0
          2        ASSIGN                                                   !1, ~3
    4     3        CONCAT                                           ~5      !1, '%0D%0A'
          4        ECHO                                                     ~5
    5     5        INIT_FCALL                                               'substr'
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 -2
          8        DO_ICALL                                         $6      
          9        ECHO                                                     $6
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.09 ms | 1394 KiB | 15 Q