3v4l.org

run code in 500+ 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:  23
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        FETCH_DIM_R                                          ~6      !1, 'event'
          8        FETCH_DIM_R                                          ~7      ~6, 'saved_response'
          9        FRAMELESS_ICALL_3                preg_replace        ~8      '%2F%5Cs%2B%2F', '+'
         10        OP_DATA                                                      ~7
         11        FRAMELESS_ICALL_1                trim                ~9      ~8
         12        SEND_VAL                                                     ~9
         13        SEND_VAL                                                     <true>
         14        DO_ICALL                                             $10     
         15        ASSIGN                                                       !2, $10
   14    16        INIT_FCALL                                                   'var_dump'
         17        SEND_VAR                                                     !1
         18        DO_ICALL                                                     
   15    19        INIT_FCALL                                                   'var_dump'
         20        SEND_VAR                                                     !2
         21        DO_ICALL                                                     
         22      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
235.78 ms | 2277 KiB | 15 Q