3v4l.org

run code in 300+ PHP versions simultaneously
<?php $X = '{"a":"a","b":"b","c":"c","d":"d","e":"e","f":"f9","g":"g2","h":"h1"}'; print_r((fn()=>array_keys(json_decode($X,1)))()); print_r((fn()=>array_values(json_decode($X,1)))());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b7nDL
function name:  (null)
number of ops:  16
compiled vars:  !0 = $X
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%22a%22%3A%22a%22%2C%22b%22%3A%22b%22%2C%22c%22%3A%22c%22%2C%22d%22%3A%22d%22%2C%22e%22%3A%22e%22%2C%22f%22%3A%22f9%22%2C%22g%22%3A%22g2%22%2C%22h%22%3A%22h1%22%7D'
    5     1        INIT_FCALL                                               'print_r'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fb7nDL%3A5%240'
          3        BIND_LEXICAL                                             ~2, !0
          4        INIT_DYNAMIC_CALL                                        ~2
          5        DO_FCALL                                      0  $3      
          6        SEND_VAR                                                 $3
          7        DO_ICALL                                                 
    7     8        INIT_FCALL                                               'print_r'
          9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fb7nDL%3A7%241'
         10        BIND_LEXICAL                                             ~5, !0
         11        INIT_DYNAMIC_CALL                                        ~5
         12        DO_FCALL                                      0  $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fb7nDL%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b7nDL
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $X
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   BIND_STATIC                                              !0
          1        INIT_FCALL                                               'array_keys'
          2        INIT_FCALL                                               'json_decode'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 1
          5        DO_ICALL                                         $1      
          6        SEND_VAR                                                 $1
          7        DO_ICALL                                         $2      
          8      > RETURN                                                   $2
          9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fb7nDL%3A5%240

Function %00%7Bclosure%7D%2Fin%2Fb7nDL%3A7%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b7nDL
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $X
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   BIND_STATIC                                              !0
          1        INIT_FCALL                                               'array_values'
          2        INIT_FCALL                                               'json_decode'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 1
          5        DO_ICALL                                         $1      
          6        SEND_VAR                                                 $1
          7        DO_ICALL                                         $2      
          8      > RETURN                                                   $2
          9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fb7nDL%3A7%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.64 ms | 1400 KiB | 21 Q