3v4l.org

run code in 500+ 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:  21
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                                                   'array_map'
          6        DECLARE_LAMBDA_FUNCTION                              ~5      [0]
          7        SEND_VAL                                                     ~5
          8        SEND_VAR                                                     !1
          9        DO_ICALL                                             $6      
         10        FRAMELESS_ICALL_2                implode             ~7      '%2C+', $6
         11        ECHO                                                         ~7
    7    12        ECHO                                                         '%0A'
    8    13        INIT_FCALL                                                   'array_map'
         14        DECLARE_LAMBDA_FUNCTION                              ~8      [1]
         15        SEND_VAL                                                     ~8
         16        SEND_VAR                                                     !1
         17        DO_ICALL                                             $9      
         18        FRAMELESS_ICALL_2                implode             ~10     '%2C+', $9
         19        ECHO                                                         ~10
         20      > 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:/in/p3p45:6}
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:/in/p3p45:8}
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.5.0


preferences:
170.39 ms | 2608 KiB | 15 Q