3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'dave@random'; $a = ereg('@', $str); $b = strpos($str, '@'); var_dump($a, $b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A1Sqf
function name:  (null)
number of ops:  16
compiled vars:  !0 = $str, !1 = $a, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'dave%40random'
    5     1        INIT_FCALL_BY_NAME                                       'ereg'
          2        SEND_VAL_EX                                              '%40'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $4      
          5        ASSIGN                                                   !1, $4
    6     6        INIT_FCALL                                               'strpos'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 '%40'
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
    8    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.18 ms | 1398 KiB | 17 Q