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; }; echo ($a instanceof Closure); $final_string = implode(' | ', (function($values) { $return = array(); foreach($values as $value) $return[] = '<a href="' . $value['uri'] . '">' . $value['title'] . '</a>'; return $return; })); echo $final_string;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5nWnM
function name:  (null)
number of ops:  13
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%2F5nWnM%3A14%240'
          2        ASSIGN                                                   !1, ~4
   23     3        INSTANCEOF                                       ~6      !1, 'Closure'
          4        ECHO                                                     ~6
   25     5        INIT_FCALL                                               'implode'
          6        SEND_VAL                                                 '+%7C+'
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F5nWnM%3A25%241'
   32     8        SEND_VAL                                                 ~7
          9        DO_ICALL                                         $8      
   25    10        ASSIGN                                                   !2, $8
   34    11        ECHO                                                     !2
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F5nWnM%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/5nWnM
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%2F5nWnM%3A14%240

Function %00%7Bclosure%7D%2Fin%2F5nWnM%3A25%241:
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/5nWnM
function name:  {closure}
number of ops:  16
compiled vars:  !0 = $values, !1 = $return, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   RECV                                             !0      
   26     1        ASSIGN                                                   !1, <array>
   28     2      > FE_RESET_R                                       $4      !0, ->13
          3    > > FE_FETCH_R                                               $4, !2, ->13
   29     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
   28    12      > JMP                                                      ->3
         13    >   FE_FREE                                                  $4
   31    14      > RETURN                                                   !1
   32    15*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F5nWnM%3A25%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.44 ms | 1400 KiB | 15 Q