3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_links() { return array_map( function ($range) { return array_shift($range) . '-' . array_pop($range); }, array_chunk(range('A', 'Z'), 3) ); } function make_link($link) { return '<a title="filter results by letter '.$link.'" href="/business/'.$link.'">'; } echo implode('|', array_map('make_link', get_links()));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DjHvf
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'implode'
          1        SEND_VAL                                                 '%7C'
          2        INIT_FCALL                                               'array_map'
          3        SEND_VAL                                                 'make_link'
          4        INIT_FCALL                                               'get_links'
          5        DO_FCALL                                      0  $0      
          6        SEND_VAR                                                 $0
          7        DO_ICALL                                         $1      
          8        SEND_VAR                                                 $1
          9        DO_ICALL                                         $2      
         10        ECHO                                                     $2
         11      > RETURN                                                   1

Function get_links:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DjHvf
function name:  get_links
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'array_map'
    5     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FDjHvf%3A5%240'
          2        SEND_VAL                                                 ~0
    6     3        INIT_FCALL                                               'array_chunk'
          4        INIT_FCALL                                               'range'
          5        SEND_VAL                                                 'A'
          6        SEND_VAL                                                 'Z'
          7        DO_ICALL                                         $1      
          8        SEND_VAR                                                 $1
          9        SEND_VAL                                                 3
         10        DO_ICALL                                         $2      
         11        SEND_VAR                                                 $2
         12        DO_ICALL                                         $3      
         13      > RETURN                                                   $3
    8    14*     > RETURN                                                   null

End of function get_links

Function %00%7Bclosure%7D%2Fin%2FDjHvf%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DjHvf
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $range
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'array_shift'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                         $1      
          4        CONCAT                                           ~2      $1, '-'
          5        INIT_FCALL                                               'array_pop'
          6        SEND_REF                                                 !0
          7        DO_ICALL                                         $3      
          8        CONCAT                                           ~4      ~2, $3
          9      > RETURN                                                   ~4
         10*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FDjHvf%3A5%240

Function make_link:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DjHvf
function name:  make_link
number of ops:  7
compiled vars:  !0 = $link
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        CONCAT                                           ~1      '%3Ca+title%3D%22filter+results+by+letter+', !0
          2        CONCAT                                           ~2      ~1, '%22+href%3D%22%2Fbusiness%2F'
          3        CONCAT                                           ~3      ~2, !0
          4        CONCAT                                           ~4      ~3, '%22%3E'
          5      > RETURN                                                   ~4
   12     6*     > RETURN                                                   null

End of function make_link

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.04 ms | 1403 KiB | 26 Q