3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = function() { $p = 'abcde'; $c = 'abc'; var_export(substr($p, 0, strlen($c)) == $c, true); }; $s = microtime(1); for ($i =0; $i < 100; $i++) { $test(); } echo microtime(1) - $s;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 8
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 8
Branch analysis from position: 13
Branch analysis from position: 8
filename:       /in/OpGHG
function name:  (null)
number of ops:  19
compiled vars:  !0 = $test, !1 = $s, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FOpGHG%3A3%240'
          1        ASSIGN                                                   !0, ~3
   10     2        INIT_FCALL                                               'microtime'
          3        SEND_VAL                                                 1
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
   12     6        ASSIGN                                                   !2, 0
          7      > JMP                                                      ->11
   13     8    >   INIT_DYNAMIC_CALL                                        !0
          9        DO_FCALL                                      0          
   12    10        PRE_INC                                                  !2
         11    >   IS_SMALLER                                               !2, 100
         12      > JMPNZ                                                    ~10, ->8
   16    13    >   INIT_FCALL                                               'microtime'
         14        SEND_VAL                                                 1
         15        DO_ICALL                                         $11     
         16        SUB                                              ~12     $11, !1
         17        ECHO                                                     ~12
         18      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FOpGHG%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OpGHG
function name:  {closure}
number of ops:  14
compiled vars:  !0 = $p, !1 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 'abcde'
    6     1        ASSIGN                                                   !1, 'abc'
    7     2        INIT_FCALL                                               'var_export'
          3        INIT_FCALL                                               'substr'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 0
          6        STRLEN                                           ~4      !1
          7        SEND_VAL                                                 ~4
          8        DO_ICALL                                         $5      
          9        IS_EQUAL                                         ~6      !1, $5
         10        SEND_VAL                                                 ~6
         11        SEND_VAL                                                 <true>
         12        DO_ICALL                                                 
    8    13      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FOpGHG%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.51 ms | 1396 KiB | 19 Q