3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function addTen($number) { if (time() % 10 === 0) { echo 'yep'; //sleep(5); } return ((int) $number + 10); } echo addTen(20);
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/MJR8k
function name:  (null)
number of ops:  6
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   NOP                                                      
  15     1        INIT_FCALL                                               'addten'
         2        SEND_VAL                                                 20
         3        DO_FCALL                                      0  $0      
         4        ECHO                                                     $0
         5      > RETURN                                                   1

Function addten:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
Jump found. Position 1 = -2
Branch analysis from position: 7
filename:       /in/MJR8k
function name:  addTen
number of ops:  11
compiled vars:  !0 = $number
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   RECV                                             !0      
   6     1        INIT_FCALL                                               'time'
         2        DO_ICALL                                         $1      
         3        MOD                                              ~2      $1, 10
         4        IS_IDENTICAL                                     ~3      ~2, 0
         5      > JMPZ                                                     ~3, ->7
   8     6    >   ECHO                                                     'yep'
  11     7    >   CAST                                          4  ~4      !0
         8        ADD                                              ~5      ~4, 10
         9      > RETURN                                                   ~5
  12    10*     > RETURN                                                   null

End of function addten

Generated using Vulcan Logic Dumper, using php 7.2.0