3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Example { private $string; private $int; private $bool; function __construct() { $this->string = "Nabir"; $this->int = 19; $this->bool = true; return 0; } function printDetails() { printf("Hello! My name is %s, I am %d years old and it is %b (0 = false, 1 = true) that I am a male.", $this->string, $this->int, $this->bool); } } $instance = new Example(); echo $instance->printDetails(); ?>
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/Z4WqP
function name:  (null)
number of ops:  8
compiled vars:  !0 = $instance
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   NOP                                                      
  28     1        NEW                                              $2      :-6
         2        DO_FCALL                                      0          
         3        ASSIGN                                                   !0, $2
  29     4        INIT_METHOD_CALL                                         !0, 'printDetails'
         5        DO_FCALL                                      0  $5      
         6        ECHO                                                     $5
         7      > RETURN                                                   1

Class Example:
Function __construct:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/Z4WqP
function name:  __construct
number of ops:  8
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  12     0  E >   ASSIGN_OBJ                                               'string'
         1        OP_DATA                                                  'Nabir'
  13     2        ASSIGN_OBJ                                               'int'
         3        OP_DATA                                                  19
  14     4        ASSIGN_OBJ                                               'bool'
         5        OP_DATA                                                  <true>
  16     6      > RETURN                                                   0
  18     7*     > RETURN                                                   null

End of function __construct

Function printdetails:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/Z4WqP
function name:  printDetails
number of ops:  10
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  22     0  E >   INIT_FCALL                                               'printf'
         1        SEND_VAL                                                 'Hello%21+My+name+is+%25s%2C+I+am+%25d+years+old+and+it+is+%25b+%280+%3D+false%2C+1+%3D+true%29+that+I+am+a+male.'
         2        FETCH_OBJ_R                                      $0      'string'
         3        SEND_VAR                                                 $0
         4        FETCH_OBJ_R                                      $1      'int'
         5        SEND_VAR                                                 $1
         6        FETCH_OBJ_R                                      $2      'bool'
         7        SEND_VAR                                                 $2
         8        DO_ICALL                                                 
  24     9      > RETURN                                                   null

End of function printdetails

End of class Example.

Generated using Vulcan Logic Dumper, using php 7.3.0