3v4l.org

run code in 300+ PHP versions simultaneously
<?php $values = array( 'one' => array( 'title' => 'Title One', 'uri' => 'http://example.com/one', ), 'two' => array( 'title' => 'Title Two', 'uri' => 'http://example.com/two', ), ); $a = function($values) { $return = array(); foreach($values as $value) $return[] = '<a href="' . $value['uri'] . '">' . $value['title'] . '</a>'; return $return; }; $final_string = implode(' | ', $a($values)); echo $final_string; var_dump($a instanceof Closure); var_dump(is_array(function() { return array(); }));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RZfYu
function name:  (null)
number of ops:  22
compiled vars:  !0 = $values, !1 = $a, !2 = $final_string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   14     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FRZfYu%3A14%240'
          2        ASSIGN                                                   !1, ~4
   23     3        INIT_FCALL                                               'implode'
          4        SEND_VAL                                                 '+%7C+'
          5        INIT_DYNAMIC_CALL                                        !1
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $6      
          8        SEND_VAR                                                 $6
          9        DO_ICALL                                         $7      
         10        ASSIGN                                                   !2, $7
   25    11        ECHO                                                     !2
   27    12        INIT_FCALL                                               'var_dump'
         13        INSTANCEOF                                       ~9      !1, 'Closure'
         14        SEND_VAL                                                 ~9
         15        DO_ICALL                                                 
   29    16        INIT_FCALL                                               'var_dump'
         17        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FRZfYu%3A29%241'
         18        TYPE_CHECK                                  128  ~12     ~11
         19        SEND_VAL                                                 ~12
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FRZfYu%3A14%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 13
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 13
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/RZfYu
function name:  {closure}
number of ops:  16
compiled vars:  !0 = $values, !1 = $return, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        ASSIGN                                                   !1, <array>
   17     2      > FE_RESET_R                                       $4      !0, ->13
          3    > > FE_FETCH_R                                               $4, !2, ->13
   18     4    >   FETCH_DIM_R                                      ~6      !2, 'uri'
          5        CONCAT                                           ~7      '%3Ca+href%3D%22', ~6
          6        CONCAT                                           ~8      ~7, '%22%3E'
          7        FETCH_DIM_R                                      ~9      !2, 'title'
          8        CONCAT                                           ~10     ~8, ~9
          9        CONCAT                                           ~11     ~10, '%3C%2Fa%3E'
         10        ASSIGN_DIM                                               !1
         11        OP_DATA                                                  ~11
   17    12      > JMP                                                      ->3
         13    >   FE_FREE                                                  $4
   20    14      > RETURN                                                   !1
   21    15*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FRZfYu%3A14%240

Function %00%7Bclosure%7D%2Fin%2FRZfYu%3A29%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RZfYu
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E > > RETURN                                                   <array>
          1*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FRZfYu%3A29%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.34 ms | 1400 KiB | 17 Q