3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fruits = array("Lemony & Fresh","Orange Twist","Apple Juice"); print_r($fruits); echo '<br />'; function name_base($key) { $name2 = str_replace(" ", "_", $key); $name3 = str_replace("&", "and", $name2); $name4 = strtolower($name3); echo $name4.'<br />'; return $name4; } echo '<br />'; $test = array_map('name_base', $fruits); $fruits_fixed = $test; echo '<br />'; print_r($fruits_fixed);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Bs5fC
function name:  (null)
number of ops:  17
compiled vars:  !0 = $fruits, !1 = $test, !2 = $fruits_fixed
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    6     4        ECHO                                                     '%3Cbr+%2F%3E'
   16     5        ECHO                                                     '%3Cbr+%2F%3E'
   18     6        INIT_FCALL                                               'array_map'
          7        SEND_VAL                                                 'name_base'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !1, $5
   19    11        ASSIGN                                                   !2, !1
   20    12        ECHO                                                     '%3Cbr+%2F%3E'
   21    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Function name_base:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Bs5fC
function name:  name_base
number of ops:  21
compiled vars:  !0 = $key, !1 = $name2, !2 = $name3, !3 = $name4
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
   10     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 '+'
          3        SEND_VAL                                                 '_'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
   11     7        INIT_FCALL                                               'str_replace'
          8        SEND_VAL                                                 '%26'
          9        SEND_VAL                                                 'and'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !2, $6
   12    13        INIT_FCALL                                               'strtolower'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                         $8      
         16        ASSIGN                                                   !3, $8
   13    17        CONCAT                                           ~10     !3, '%3Cbr+%2F%3E'
         18        ECHO                                                     ~10
   14    19      > RETURN                                                   !3
   15    20*     > RETURN                                                   null

End of function name_base

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.76 ms | 1396 KiB | 21 Q