3v4l.org

run code in 300+ PHP versions simultaneously
<?php class vehiclePurchase { public $discount = 0; public function governmentDiscount() { if("03-06-18" > "03-06-18") { $this->discount = 4500; } } } $v = new vehiclePurchase; $v->governmentDiscount(); print_r($v);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UeH7Z
function name:  (null)
number of ops:  9
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'vehiclePurchase'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_METHOD_CALL                                         !0, 'governmentDiscount'
          4        DO_FCALL                                      0          
   18     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class vehiclePurchase:
Function governmentdiscount:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 1, Position 2 = 3
Branch analysis from position: 1
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
filename:       /in/UeH7Z
function name:  governmentDiscount
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E > > JMPZ                                                     <false>, ->3
   11     1    >   ASSIGN_OBJ                                               'discount'
          2        OP_DATA                                                  4500
   13     3    > > RETURN                                                   null

End of function governmentdiscount

End of class vehiclePurchase.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.36 ms | 1399 KiB | 15 Q