3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{ "data": [ { "message_count": 14051 }, { "message_count": 12731 }, { "message_count": 7867 }, { "message_count": 6053 }, { "message_count": 4 } ] }'; $json_a=json_decode($json,true); $counting_base = ($json_a['data']); var_dump($counting_base); echo array_sum($counting_base);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/re5BR
function name:  (null)
number of ops:  16
compiled vars:  !0 = $json, !1 = $json_a, !2 = $counting_base
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%0A++%22data%22%3A+%5B%0A++++%7B%0A++++++%22message_count%22%3A+14051%0A++++%7D%2C%0A++++%7B%0A++++++%22message_count%22%3A+12731%0A++++%7D%2C%0A++++%7B%0A++++++%22message_count%22%3A+7867%0A++++%7D%2C%0A++++%7B%0A++++++%22message_count%22%3A+6053%0A++++%7D%2C%0A++++%7B%0A++++++%22message_count%22%3A+4%0A++++%7D%0A++%5D%0A%7D'
   23     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
   24     6        FETCH_DIM_R                                      ~6      !1, 'data'
          7        ASSIGN                                                   !2, ~6
   26     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                                 
   28    11        INIT_FCALL                                               'array_sum'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $9      
         14        ECHO                                                     $9
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.71 ms | 1395 KiB | 19 Q