3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class PonyTown { public static function gimmeSomeLovin($relation) { echo sprintf('%s loves it', $relation) . PHP_EOL; } } $g = [PonyTown::class, 'gimmeSomeLovin']; $g("Ron's dad"); $f = PonyTown::class . '::gimmeSomeLovin'; $f('Your nan');
based on j190A
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/csGnn
function name:  (null)
number of ops:  10
compiled vars:  !0 = $g, !1 = $f
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   NOP                                                      
   8     1        ASSIGN                                                   !0, <array>
  10     2        INIT_DYNAMIC_CALL                                        !0
         3        SEND_VAL_EX                                              'Ron%27s+dad'
         4        DO_FCALL                                      0          
  12     5        ASSIGN                                                   !1, 'PonyTown%3A%3AgimmeSomeLovin'
  14     6        INIT_DYNAMIC_CALL                                        !1
         7        SEND_VAL_EX                                              'Your+nan'
         8        DO_FCALL                                      0          
         9      > RETURN                                                   1

Class PonyTown:
Function gimmesomelovin:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/csGnn
function name:  gimmeSomeLovin
number of ops:  8
compiled vars:  !0 = $relation
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   RECV                                             !0      
   4     1        INIT_FCALL                                               'sprintf'
         2        SEND_VAL                                                 '%25s+loves+it'
         3        SEND_VAR                                                 !0
         4        DO_ICALL                                         $1      
         5        CONCAT                                           ~2      $1, '%0A'
         6        ECHO                                                     ~2
   5     7      > RETURN                                                   null

End of function gimmesomelovin

End of class PonyTown.

Generated using Vulcan Logic Dumper, using php 7.3.0