3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = new StdClass(); $obj->foo = "foo"; $objects = array(); for ($i = 0; $i < 5; $i++) { $objects[] = clone $obj; } $string = json_encode($objects); var_dump(array($string, escapeshellarg($string)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 8
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 8
Branch analysis from position: 14
Branch analysis from position: 8
filename:       /in/sRVHl
function name:  (null)
number of ops:  27
compiled vars:  !0 = $obj, !1 = $objects, !2 = $i, !3 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'StdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    3     3        ASSIGN_OBJ                                               !0, 'foo'
          4        OP_DATA                                                  'foo'
    4     5        ASSIGN                                                   !1, <array>
    5     6        ASSIGN                                                   !2, 0
          7      > JMP                                                      ->12
    6     8    >   CLONE                                            ~11     !0
          9        ASSIGN_DIM                                               !1
         10        OP_DATA                                                  ~11
    5    11        PRE_INC                                                  !2
         12    >   IS_SMALLER                                               !2, 5
         13      > JMPNZ                                                    ~13, ->8
    8    14    >   INIT_FCALL                                               'json_encode'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $14     
         17        ASSIGN                                                   !3, $14
    9    18        INIT_FCALL                                               'var_dump'
         19        INIT_ARRAY                                       ~16     !3
         20        INIT_FCALL                                               'escapeshellarg'
         21        SEND_VAR                                                 !3
         22        DO_ICALL                                         $17     
         23        ADD_ARRAY_ELEMENT                                ~16     $17
         24        SEND_VAL                                                 ~16
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.43 ms | 1395 KiB | 19 Q