3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Drive_Filter_NormalizeName // implements Zend_Filter_Interface { protected function _replace(array $match) { print_r($match); } public function filter($name) { if (function_exists('mb_strtolower')) { $name = mb_strtolower($name); } else { $name = strtolower($name); } $name = preg_replace_callback('/(\d+)(\.)?/', array($this, '_replace'), $name); return $name; } } $filter = new Drive_Filter_NormalizeName; echo $filter->filter('dupa5_5.23_dupa3');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1a2uj
function name:  (null)
number of ops:  8
compiled vars:  !0 = $filter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $1      'Drive_Filter_NormalizeName'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   25     3        INIT_METHOD_CALL                                         !0, 'filter'
          4        SEND_VAL_EX                                              'dupa5_5.23_dupa3'
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
          7      > RETURN                                                   1

Class Drive_Filter_NormalizeName:
Function _replace:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1a2uj
function name:  _replace
number of ops:  5
compiled vars:  !0 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    8     4      > RETURN                                                   null

End of function _replace

Function filter:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1a2uj
function name:  filter
number of ops:  25
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        INIT_FCALL                                               'function_exists'
          2        SEND_VAL                                                 'mb_strtolower'
          3        DO_ICALL                                         $1      
          4      > JMPZ                                                     $1, ->10
   13     5    >   INIT_FCALL                                               'mb_strtolower'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $2      
          8        ASSIGN                                                   !0, $2
          9      > JMP                                                      ->14
   15    10    >   INIT_FCALL                                               'strtolower'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $4      
         13        ASSIGN                                                   !0, $4
   18    14    >   INIT_FCALL                                               'preg_replace_callback'
         15        SEND_VAL                                                 '%2F%28%5Cd%2B%29%28%5C.%29%3F%2F'
         16        FETCH_THIS                                       ~6      
         17        INIT_ARRAY                                       ~7      ~6
         18        ADD_ARRAY_ELEMENT                                ~7      '_replace'
         19        SEND_VAL                                                 ~7
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $8      
         22        ASSIGN                                                   !0, $8
   20    23      > RETURN                                                   !0
   21    24*     > RETURN                                                   null

End of function filter

End of class Drive_Filter_NormalizeName.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.98 ms | 1400 KiB | 23 Q