3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getResults(array $num = []): string { return implode(", ", array_map(fn ($obj) => json_decode($obj)->number , $num)); } $json = ['{"number":"115"}','{"number":"135"}']; echo getResults($json);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HUmuM
function name:  (null)
number of ops:  6
compiled vars:  !0 = $json
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, <array>
   11     1        INIT_FCALL                                               'getresults'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

Function getresults:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HUmuM
function name:  getResults
number of ops:  14
compiled vars:  !0 = $num
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      <array>
    5     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%2C+'
          3        INIT_FCALL                                               'array_map'
          4        DECLARE_LAMBDA_FUNCTION                          ~1      [0]
          5        SEND_VAL                                                 ~1
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                         $3      
         10        VERIFY_RETURN_TYPE                                       $3
         11      > RETURN                                                   $3
    6    12*       VERIFY_RETURN_TYPE                                       
         13*     > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HUmuM
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        FETCH_OBJ_R                                      ~2      $1, 'number'
          5      > RETURN                                                   ~2
          6*     > RETURN                                                   null

End of Dynamic Function 0

End of function getresults

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.28 ms | 1007 KiB | 17 Q