3v4l.org

run code in 500+ PHP versions simultaneously
<?php $ar = array(); for($i=1;$i<5;$i++) { $ar[] = array('date' => date("j F y",strtotime("+".$i." days")), 'id' => $i); } echo json_encode($ar);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 3
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 3
Branch analysis from position: 19
Branch analysis from position: 3
filename:       /in/nhUSV
function name:  (null)
number of ops:  24
compiled vars:  !0 = $ar, !1 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        ASSIGN                                                       !1, 1
          2      > JMP                                                          ->17
    5     3    >   INIT_FCALL                                                   'date'
          4        SEND_VAL                                                     'j+F+y'
          5        INIT_FCALL                                                   'strtotime'
          6        CONCAT                                               ~5      '%2B', !1
          7        CONCAT                                               ~6      ~5, '+days'
          8        SEND_VAL                                                     ~6
          9        DO_ICALL                                             $7      
         10        SEND_VAR                                                     $7
         11        DO_ICALL                                             $8      
         12        INIT_ARRAY                                           ~9      $8, 'date'
         13        ADD_ARRAY_ELEMENT                                    ~9      !1, 'id'
         14        ASSIGN_DIM                                                   !0
         15        OP_DATA                                                      ~9
    4    16        PRE_INC                                                      !1
         17    >   IS_SMALLER                                                   !1, 5
         18      > JMPNZ                                                        ~11, ->3
    7    19    >   INIT_FCALL                                                   'json_encode'
         20        SEND_VAR                                                     !0
         21        DO_ICALL                                             $12     
         22        ECHO                                                         $12
         23      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
212.8 ms | 2147 KiB | 16 Q