3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json_object = '[{"125":"1"},{"126":"2"},{"127":"3"},{"128":"4"},{"129":"5"},{"130":"6"},{"131":"7"},{"132":"8"},{"133":"9"},{"134":"10"},{"135":"11"}]'; $json = json_decode($json_object); echo implode(", ", array_map(function($obj) { foreach ($obj as $p => $v) { return $p;} }, $json)); echo "\n"; echo implode(", ", array_map(function($obj) { foreach ($obj as $p => $v) { return $v;} }, $json));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p3p45
function name:  (null)
number of ops:  27
compiled vars:  !0 = $json_object, !1 = $json
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5B%7B%22125%22%3A%221%22%7D%2C%7B%22126%22%3A%222%22%7D%2C%7B%22127%22%3A%223%22%7D%2C%7B%22128%22%3A%224%22%7D%2C%7B%22129%22%3A%225%22%7D%2C%7B%22130%22%3A%226%22%7D%2C%7B%22131%22%3A%227%22%7D%2C%7B%22132%22%3A%228%22%7D%2C%7B%22133%22%3A%229%22%7D%2C%7B%22134%22%3A%2210%22%7D%2C%7B%22135%22%3A%2211%22%7D%5D'
    5     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
    6     5        INIT_FCALL                                               'implode'
          6        SEND_VAL                                                 '%2C+'
          7        INIT_FCALL                                               'array_map'
          8        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
          9        SEND_VAL                                                 ~5
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                         $7      
         14        ECHO                                                     $7
    7    15        ECHO                                                     '%0A'
    8    16        INIT_FCALL                                               'implode'
         17        SEND_VAL                                                 '%2C+'
         18        INIT_FCALL                                               'array_map'
         19        DECLARE_LAMBDA_FUNCTION                          ~8      [1]
         20        SEND_VAL                                                 ~8
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                         $9      
         23        SEND_VAR                                                 $9
         24        DO_ICALL                                         $10     
         25        ECHO                                                     $10
         26      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 7
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/p3p45
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $obj, !1 = $v, !2 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1      > FE_RESET_R                                       $3      !0, ->7
          2    > > FE_FETCH_R                                       ~4      $3, !1, ->7
          3    >   ASSIGN                                                   !2, ~4
          4        FE_FREE                                                  $3
          5      > RETURN                                                   !2
          6*       JMP                                                      ->2
          7    >   FE_FREE                                                  $3
          8      > RETURN                                                   null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 7
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/p3p45
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $obj, !1 = $v, !2 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1      > FE_RESET_R                                       $3      !0, ->7
          2    > > FE_FETCH_R                                       ~4      $3, !1, ->7
          3    >   ASSIGN                                                   !2, ~4
          4        FE_FREE                                                  $3
          5      > RETURN                                                   !1
          6*       JMP                                                      ->2
          7    >   FE_FREE                                                  $3
          8      > RETURN                                                   null

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.38 ms | 1007 KiB | 16 Q