3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.31 ms | 1385 KiB | 19 Q