3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json_str = <<<TEXT { "Example": { "ExampleOne": { "rate": "0" }, "ExampleTwo": { "rate": "0" }, "ExampleThree": { "rate": "0" } } } TEXT; $json = json_decode($json_str, true); $keys = array_keys($json['Example']); print_r($keys);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/keqWY
function name:  (null)
number of ops:  15
compiled vars:  !0 = $json_str, !1 = $json, !2 = $keys
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%0A%09%22Example%22%3A+%7B%0A%09%09%22ExampleOne%22%3A+%7B%0A%09%09%09%22rate%22%3A+%220%22%0A%09%09%7D%2C%0A%09%09%22ExampleTwo%22%3A+%7B%0A%09%09%09%22rate%22%3A+%220%22%0A%09%09%7D%2C%0A%09%09%22ExampleThree%22%3A+%7B%0A%09%09%09%22rate%22%3A+%220%22%0A%09%09%7D%0A%09%7D%0A%7D'
   19     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
   21     6        INIT_FCALL                                               'array_keys'
          7        FETCH_DIM_R                                      ~6      !1, 'Example'
          8        SEND_VAL                                                 ~6
          9        DO_ICALL                                         $7      
         10        ASSIGN                                                   !2, $7
   22    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.57 ms | 1399 KiB | 19 Q