3v4l.org

run code in 300+ PHP versions simultaneously
<?php $force = true; class Demo { private $force = false; public function setForce($force) { $this->force = (int) $force; } public function getForce() { return $this->force; } } $demo = new Demo(); $demo->setForce($force); var_dump($demo->getForce());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QSnlc
function name:  (null)
number of ops:  13
compiled vars:  !0 = $force, !1 = $demo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <true>
   19     1        NEW                                              $3      'Demo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
   20     4        INIT_METHOD_CALL                                         !1, 'setForce'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   21     7        INIT_FCALL                                               'var_dump'
          8        INIT_METHOD_CALL                                         !1, 'getForce'
          9        DO_FCALL                                      0  $7      
         10        SEND_VAR                                                 $7
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class Demo:
Function setforce:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QSnlc
function name:  setForce
number of ops:  5
compiled vars:  !0 = $force
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
   10     1        CAST                                          4  ~2      !0
          2        ASSIGN_OBJ                                               'force'
          3        OP_DATA                                                  ~2
   11     4      > RETURN                                                   null

End of function setforce

Function getforce:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QSnlc
function name:  getForce
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   FETCH_OBJ_R                                      ~0      'force'
          1      > RETURN                                                   ~0
   16     2*     > RETURN                                                   null

End of function getforce

End of class Demo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.27 ms | 1395 KiB | 15 Q