3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array("name:Dave", "adres:Block 14", "zipcode:1234AD"); var_export( preg_replace_callback( '~^[^:]+:~', function($m) { return ucfirst($m[0]) . ' '; }, $data ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LDiMH
function name:  (null)
number of ops:  11
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'var_export'
    6     2        INIT_FCALL                                               'preg_replace_callback'
    7     3        SEND_VAL                                                 '%7E%5E%5B%5E%3A%5D%2B%3A%7E'
    8     4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FLDiMH%3A8%240'
   10     5        SEND_VAL                                                 ~2
   11     6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                                 
   13    10      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FLDiMH%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.44 ms | 1403 KiB | 20 Q