3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = new StdClass(); $obj->a = 'aaa'; $obj->b = 'bbb'; var_dump(implode('","',(array)$obj)); $ar = ['x','y']; var_dump(json_encode($ar));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NQvjR
function name:  (null)
number of ops:  23
compiled vars:  !0 = $obj, !1 = $ar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'StdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    4     3        ASSIGN_OBJ                                               !0, 'a'
          4        OP_DATA                                                  'aaa'
    5     5        ASSIGN_OBJ                                               !0, 'b'
          6        OP_DATA                                                  'bbb'
    7     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'implode'
          9        SEND_VAL                                                 '%22%2C%22'
         10        CAST                                          7  ~7      !0
         11        SEND_VAL                                                 ~7
         12        DO_ICALL                                         $8      
         13        SEND_VAR                                                 $8
         14        DO_ICALL                                                 
    9    15        ASSIGN                                                   !1, <array>
   10    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'json_encode'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $11     
         20        SEND_VAR                                                 $11
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.62 ms | 1386 KiB | 19 Q