3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Cron { Function run ($job) { $jobs = array ('newsfeed'); if (in_array ($job, $jobs)) call_user_func (array ($this, "_$job")); } private Function _newsfeed () { echo 'newsfeed'; } } $cron = new Cron (); $cron->run ('newsfeed');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pTEek
function name:  (null)
number of ops:  7
compiled vars:  !0 = $cron
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'Cron'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   21     3        INIT_METHOD_CALL                                         !0, 'run'
          4        SEND_VAL_EX                                              'newsfeed'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class Cron:
Function run:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/pTEek
function name:  run
number of ops:  15
compiled vars:  !0 = $job, !1 = $jobs
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        ASSIGN                                                   !1, <array>
    8     2        INIT_FCALL                                               'in_array'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $3      
          6      > JMPZ                                                     $3, ->14
    9     7    >   FETCH_THIS                                       ~4      
          8        INIT_ARRAY                                       ~5      ~4
          9        NOP                                                      
         10        FAST_CONCAT                                      ~6      '_', !0
         11        ADD_ARRAY_ELEMENT                                ~5      ~6
         12        INIT_USER_CALL                                0          'call_user_func', ~5
         13        DO_FCALL                                      0          
   10    14    > > RETURN                                                   null

End of function run

Function _newsfeed:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pTEek
function name:  _newsfeed
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ECHO                                                     'newsfeed'
   15     1      > RETURN                                                   null

End of function _newsfeed

End of class Cron.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.16 ms | 1396 KiB | 15 Q