3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = <<<JSON { "event_type": "IncomingCallEnd", "account_id": 55555, "did_num": "88001234567", "did": "7123456789", "call_id": "1588984514.9676405", "abon": "103", "billsec": "19", "secret": "4ff8rZbTZ0TllXL" } JSON; $jsonString = $json; $call = json_decode($jsonString); $call->did_num = substr_replace(trim($call->did_num),'7',0,1); print_r($call); print_r($call->did_num);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PIe8U
function name:  (null)
number of ops:  26
compiled vars:  !0 = $json, !1 = $jsonString, !2 = $call
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%0A++%22event_type%22%3A+%22IncomingCallEnd%22%2C%0A++%22account_id%22%3A+55555%2C%0A++%22did_num%22%3A+%2288001234567%22%2C%0A++%22did%22%3A+%227123456789%22%2C%0A++%22call_id%22%3A+%221588984514.9676405%22%2C%0A++%22abon%22%3A+%22103%22%2C%0A++%22billsec%22%3A+%2219%22%2C%0A++%22secret%22%3A+%224ff8rZbTZ0TllXL%22%0A%7D'
   16     1        ASSIGN                                                   !1, !0
   17     2        INIT_FCALL                                               'json_decode'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !2, $5
   18     6        INIT_FCALL                                               'substr_replace'
          7        INIT_FCALL                                               'trim'
          8        FETCH_OBJ_R                                      ~8      !2, 'did_num'
          9        SEND_VAL                                                 ~8
         10        DO_ICALL                                         $9      
         11        SEND_VAR                                                 $9
         12        SEND_VAL                                                 '7'
         13        SEND_VAL                                                 0
         14        SEND_VAL                                                 1
         15        DO_ICALL                                         $10     
         16        ASSIGN_OBJ                                               !2, 'did_num'
         17        OP_DATA                                                  $10
   20    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                                 
   21    21        INIT_FCALL                                               'print_r'
         22        FETCH_OBJ_R                                      ~12     !2, 'did_num'
         23        SEND_VAL                                                 ~12
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.54 ms | 1001 KiB | 17 Q