3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Qualtrics { public $input; public function __construct($input) { $this->input = $input; } public function output(){ if($this->allowedFormat($this->input)) { echo $this->input; } else { echo 'Disallowed Characters'; } } private function multiply($factor){ $this->input *=factor; } private function allowedFormat($qString){ return preg_match("/^[a-z0-9:_/\-]+$/i", $qString); } } $qObject2 = new Qualtrics(10); $qObject2 -> multiply(3); $qObject2 -> output();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oJvQc
function name:  (null)
number of ops:  10
compiled vars:  !0 = $qObject2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $1      'Qualtrics'
          1        SEND_VAL_EX                                              10
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   25     4        INIT_METHOD_CALL                                         !0, 'multiply'
          5        SEND_VAL_EX                                              3
          6        DO_FCALL                                      0          
   26     7        INIT_METHOD_CALL                                         !0, 'output'
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

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

End of function __construct

Function output:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oJvQc
function name:  output
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_METHOD_CALL                                         'allowedFormat'
          1        CHECK_FUNC_ARG                                           
          2        FETCH_OBJ_FUNC_ARG                               $0      'input'
          3        SEND_FUNC_ARG                                            $0
          4        DO_FCALL                                      0  $1      
          5      > JMPZ                                                     $1, ->9
   11     6    >   FETCH_OBJ_R                                      ~2      'input'
          7        ECHO                                                     ~2
          8      > JMP                                                      ->10
   13     9    >   ECHO                                                     'Disallowed+Characters'
   15    10    > > RETURN                                                   null

End of function output

Function multiply:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oJvQc
function name:  multiply
number of ops:  5
compiled vars:  !0 = $factor
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   17     1        FETCH_CONSTANT                                   ~2      'factor'
          2        ASSIGN_OBJ_OP                                 3          'input'
          3        OP_DATA                                                  ~2
   18     4      > RETURN                                                   null

End of function multiply

Function allowedformat:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oJvQc
function name:  allowedFormat
number of ops:  7
compiled vars:  !0 = $qString
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
   20     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%5E%5Ba-z0-9%3A_%2F%5C-%5D%2B%24%2Fi'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
   22     6*     > RETURN                                                   null

End of function allowedformat

End of class Qualtrics.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.31 ms | 1400 KiB | 15 Q