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'); 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/KK71Y
function name:  (null)
number of ops:  22
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                                               'print_r'
          3        INIT_FCALL                                               'json_decode'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
    6     9        INIT_FCALL                                               'json_encode'
         10        INIT_FCALL                                               'array_push'
         11        INIT_FCALL                                               'json_decode'
         12        SEND_VAR                                                 !0
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $6      
         15        SEND_VAR_NO_REF                               0          $6
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $7      
         18        SEND_VAR                                                 $7
         19        DO_ICALL                                         $8      
         20        ECHO                                                     $8
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.81 ms | 1395 KiB | 21 Q