3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface SlugifierInterface { /** * Return a URL safe version of a string. * * @param string $string * @return string */ public function slugify($string); } class Sluggifier implements SlugifierInterface { public function __construct() { } public function slugify($string) { return "I am from" . $string; } } echo Sluggifier::slugify("Hello World"); $sluggifier = new Sluggifier(); echo $sluggifier->slugify("Hello World from object");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/McWf4
function name:  (null)
number of ops:  13
compiled vars:  !0 = $sluggifier
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   DECLARE_CLASS                                            'sluggifier'
   25     1        INIT_STATIC_METHOD_CALL                                  'Sluggifier', 'slugify'
          2        SEND_VAL_EX                                              'Hello+World'
          3        DO_FCALL                                      0  $1      
          4        ECHO                                                     $1
   26     5        NEW                                              $2      'Sluggifier'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $2
   27     8        INIT_METHOD_CALL                                         !0, 'slugify'
          9        SEND_VAL_EX                                              'Hello+World+from+object'
         10        DO_FCALL                                      0  $5      
         11        ECHO                                                     $5
         12      > RETURN                                                   1

Class SlugifierInterface:
Function slugify:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/McWf4
function name:  slugify
number of ops:  2
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function slugify

End of class SlugifierInterface.

Class Sluggifier:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/McWf4
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E > > RETURN                                                   null

End of function __construct

Function slugify:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/McWf4
function name:  slugify
number of ops:  4
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
   21     1        CONCAT                                           ~1      'I+am+from', !0
          2      > RETURN                                                   ~1
   22     3*     > RETURN                                                   null

End of function slugify

End of class Sluggifier.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.4 ms | 1386 KiB | 13 Q