3v4l.org

run code in 500+ 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:  11
compiled vars:  !0 = $num
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                            !0      <array>
    5     1        INIT_FCALL                                                   'array_map'
          2        DECLARE_LAMBDA_FUNCTION                              ~1      [0]
          3        SEND_VAL                                                     ~1
          4        SEND_VAR                                                     !0
          5        DO_ICALL                                             $2      
          6        FRAMELESS_ICALL_2                implode             ~3      '%2C+', $2
          7        VERIFY_RETURN_TYPE                                           ~3
          8      > RETURN                                                       ~3
    6     9*       VERIFY_RETURN_TYPE                                           
         10*     > 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:getResults():5}
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.5.0


preferences:
157.73 ms | 1861 KiB | 16 Q