3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = '{ "username":"lon", "event":{ "saved_response":"{\\"parts\\": [{\\"text\\": \\"Passion for teaching means loving your job. Doing with all your heart. Teachers who are passionate can inspire pupils to love learning. Passionate teachers create an effective learning environment and increase learning potential of\\\\nstudents.\\"}]}" }, "event_source":"server" }'; $jarray = json_decode($test, true); $jevent = json_decode( $jarray['event']['saved_response'], true); var_dump($jarray); var_dump($jevent);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9k3t1
function name:  (null)
number of ops:  20
compiled vars:  !0 = $test, !1 = $jarray, !2 = $jevent
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%0A++++%22username%22%3A%22lon%22%2C%0A++++%22event%22%3A%7B%0A++++++++%22saved_response%22%3A%22%7B%5C%22parts%5C%22%3A+%5B%7B%5C%22text%5C%22%3A+%5C%22Passion+for+teaching+means+loving+your+job.+Doing+with+all+your+heart.+Teachers+who+are+passionate+can+inspire+pupils+to+love+learning.+Passionate+teachers+create+an+effective+learning+environment+and+increase+learning+potential+of%5C%5Cnstudents.%5C%22%7D%5D%7D%22%0A++++%7D%2C%0A++++%22event_source%22%3A%22server%22%0A%7D'
   12     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
   13     6        INIT_FCALL                                               'json_decode'
          7        FETCH_DIM_R                                      ~6      !1, 'event'
          8        FETCH_DIM_R                                      ~7      ~6, 'saved_response'
          9        SEND_VAL                                                 ~7
         10        SEND_VAL                                                 <true>
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !2, $8
   14    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
   15    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.93 ms | 1002 KiB | 15 Q