3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x { public function __construct() { $strHaystack='test'; $strNeedle='t'; $numPos=strpos($strHaystack,$strNeedle); print $numpos; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OlRbc
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E > > RETURN                                                   1

Class x:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OlRbc
function name:  __construct
number of ops:  9
compiled vars:  !0 = $strHaystack, !1 = $strNeedle, !2 = $numPos, !3 = $numpos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 'test'
    8     1        ASSIGN                                                   !1, 't'
   10     2        INIT_FCALL                                               'strpos'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !2, $6
   11     7        ECHO                                                     !3
   12     8      > RETURN                                                   null

End of function __construct

End of class x.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
345.41 ms | 1394 KiB | 16 Q