3v4l.org

run code in 500+ PHP versions simultaneously
<?php // First script $a = 1; echo $a + $a++; // may print either 2 or 3 => Finally, no, it always print 3 echo "\n"; // Second script $i = 1; $array[$i] = $i++; // may set either index 1 or 2 => Same here, array will always contain index 2 and value 1 var_export($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EUknn
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $i, !2 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                       !0, 1
    5     1        POST_INC                                             ~4      !0
          2        ADD                                                  ~5      !0, ~4
          3        ECHO                                                         ~5
    6     4        ECHO                                                         '%0A'
    9     5        ASSIGN                                                       !1, 1
   10     6        POST_INC                                             ~8      !1
          7        ASSIGN_DIM                                                   !2, !1
          8        OP_DATA                                                      ~8
   11     9        INIT_FCALL                                                   'var_export'
         10        SEND_VAR                                                     !2
         11        DO_ICALL                                                     
         12      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
133.38 ms | 476 KiB | 8 Q