3v4l.org

run code in 300+ PHP versions simultaneously
<?php $comp = '{[{"date":"2014-10-04","day:"mon"},{"date":"2014-10-03","day":"tue"}]}'; echo $comp; $arr1 = array('date' => '2015-10-04' , 'day' => 'wed'); print_R(json_decode($comp,true)); echo json_encode(array_push(json_decode($comp,true),$arr1));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JtKnK
function name:  (null)
number of ops:  23
compiled vars:  !0 = $comp, !1 = $arr1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%5B%7B%22date%22%3A%222014-10-04%22%2C%22day%3A%22mon%22%7D%2C%7B%22date%22%3A%222014-10-03%22%2C%22day%22%3A%22tue%22%7D%5D%7D'
    4     1        ECHO                                                     !0
    5     2        ASSIGN                                                   !1, <array>
    6     3        INIT_FCALL                                               'print_r'
          4        INIT_FCALL                                               'json_decode'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                                 
    7    10        INIT_FCALL                                               'json_encode'
         11        INIT_FCALL                                               'array_push'
         12        INIT_FCALL                                               'json_decode'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $6      
         16        SEND_VAR_NO_REF                               0          $6
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $7      
         19        SEND_VAR                                                 $7
         20        DO_ICALL                                         $8      
         21        ECHO                                                     $8
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
201.85 ms | 1395 KiB | 21 Q