3v4l.org

run code in 300+ PHP versions simultaneously
<?php class booHoo{ public function __construct($stupidNumber, $anotherStupidNumber) { $this->stupidNumber = $stupidNumber; $this->anotherStupidNumber = $anotherStupidNumber; } public function magic() { $suchFraction = fmod($this->stupidNumber, $this->anotherStupidNumber); if($suchFraction > 0) { echo 'such Float, much fraction. Wow'; } else { echo 'such Integer, much clean. Wow'; } } } $count = float(44.28); $multiple = float(0.36); $greeter = new booHoo($count, $multiple); $greeter->magic();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dsaQ4
function name:  (null)
number of ops:  16
compiled vars:  !0 = $count, !1 = $multiple, !2 = $greeter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL_BY_NAME                                       'float'
          1        SEND_VAL_EX                                              44.28
          2        DO_FCALL                                      0  $3      
          3        ASSIGN                                                   !0, $3
   20     4        INIT_FCALL_BY_NAME                                       'float'
          5        SEND_VAL_EX                                              0.36
          6        DO_FCALL                                      0  $5      
          7        ASSIGN                                                   !1, $5
   22     8        NEW                                              $7      'booHoo'
          9        SEND_VAR_EX                                              !0
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !2, $7
   23    13        INIT_METHOD_CALL                                         !2, 'magic'
         14        DO_FCALL                                      0          
         15      > RETURN                                                   1

Class booHoo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dsaQ4
function name:  __construct
number of ops:  7
compiled vars:  !0 = $stupidNumber, !1 = $anotherStupidNumber
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        ASSIGN_OBJ                                               'stupidNumber'
          3        OP_DATA                                                  !0
    6     4        ASSIGN_OBJ                                               'anotherStupidNumber'
          5        OP_DATA                                                  !1
    7     6      > RETURN                                                   null

End of function __construct

Function magic:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dsaQ4
function name:  magic
number of ops:  13
compiled vars:  !0 = $suchFraction
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'fmod'
          1        FETCH_OBJ_R                                      ~1      'stupidNumber'
          2        SEND_VAL                                                 ~1
          3        FETCH_OBJ_R                                      ~2      'anotherStupidNumber'
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !0, $3
   11     7        IS_SMALLER                                               0, !0
          8      > JMPZ                                                     ~5, ->11
   12     9    >   ECHO                                                     'such+Float%2C+much+fraction.+Wow'
         10      > JMP                                                      ->12
   14    11    >   ECHO                                                     'such+Integer%2C+much+clean.+Wow'
   16    12    > > RETURN                                                   null

End of function magic

End of class booHoo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.78 ms | 1400 KiB | 15 Q