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( trim(preg_replace('/\s+/', ' ',$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/fnc1V
function name:  (null)
number of ops:  28
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%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        INIT_FCALL                                               'trim'
          8        INIT_FCALL                                               'preg_replace'
          9        SEND_VAL                                                 '%2F%5Cs%2B%2F'
         10        SEND_VAL                                                 '+'
         11        FETCH_DIM_R                                      ~6      !1, 'event'
         12        FETCH_DIM_R                                      ~7      ~6, 'saved_response'
         13        SEND_VAL                                                 ~7
         14        DO_ICALL                                         $8      
         15        SEND_VAR                                                 $8
         16        DO_ICALL                                         $9      
         17        SEND_VAR                                                 $9
         18        SEND_VAL                                                 <true>
         19        DO_ICALL                                         $10     
         20        ASSIGN                                                   !2, $10
   14    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                                 
   15    24        INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !2
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
244.28 ms | 1006 KiB | 17 Q