3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = ''; echo "\0"; echo '\0'; echo NULL; echo "a"; for ($t=0; $t<128; $t++) $result .= "\\".chr($t); echo "strlen = ".strlen($result)."\n"; echo "Result = ".$result."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 7
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 7
Branch analysis from position: 15
Branch analysis from position: 7
filename:       /in/AsqD6
function name:  (null)
number of ops:  23
compiled vars:  !0 = $result, !1 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, ''
    4     1        ECHO                                                     '%00'
    5     2        ECHO                                                     '%5C0'
    6     3        ECHO                                                     null
    7     4        ECHO                                                     'a'
    9     5        ASSIGN                                                   !1, 0
          6      > JMP                                                      ->13
          7    >   INIT_FCALL                                               'chr'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $4      
         10        CONCAT                                           ~5      '%5C', $4
         11        ASSIGN_OP                                     8          !0, ~5
         12        PRE_INC                                                  !1
         13    >   IS_SMALLER                                               !1, 128
         14      > JMPNZ                                                    ~8, ->7
   11    15    >   STRLEN                                           ~9      !0
         16        CONCAT                                           ~10     'strlen+%3D+', ~9
         17        CONCAT                                           ~11     ~10, '%0A'
         18        ECHO                                                     ~11
   12    19        CONCAT                                           ~12     'Result+%3D+', !0
         20        CONCAT                                           ~13     ~12, '%0A'
         21        ECHO                                                     ~13
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.81 ms | 1395 KiB | 15 Q