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'); echo json_encode(array_push(json_decode($comp),$arr1));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AbQVU
function name:  (null)
number of ops:  14
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                                               'json_encode'
          3        INIT_FCALL                                               'array_push'
          4        INIT_FCALL                                               'json_decode'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        SEND_VAR_NO_REF                               0          $4
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $5      
         10        SEND_VAR                                                 $5
         11        DO_ICALL                                         $6      
         12        ECHO                                                     $6
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.88 ms | 1394 KiB | 19 Q