3v4l.org

run code in 300+ PHP versions simultaneously
<?php function outputEmail($email){ $valid = isValidEmail($email); if($valid){ return 1 . PHP_EOL; } else{ return 0 . PHP_EOL; } } function isValidEmail($email){ return filter_var($email, FILTER_VALIDATE_EMAIL); } $test = "test"; echo $test . " : " . outputEmail($test); $test = "test'@gmail"; echo $test . " : " . outputEmail($test); $test = "test@gamil.com"; echo $test . " : " . outputEmail($test);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pJBaI
function name:  (null)
number of ops:  22
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ASSIGN                                                   !0, 'test'
   20     1        CONCAT                                           ~2      !0, '+%3A+'
          2        INIT_FCALL                                               'outputemail'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $3      
          5        CONCAT                                           ~4      ~2, $3
          6        ECHO                                                     ~4
   22     7        ASSIGN                                                   !0, 'test%27%40gmail'
   24     8        CONCAT                                           ~6      !0, '+%3A+'
          9        INIT_FCALL                                               'outputemail'
         10        SEND_VAR                                                 !0
         11        DO_FCALL                                      0  $7      
         12        CONCAT                                           ~8      ~6, $7
         13        ECHO                                                     ~8
   26    14        ASSIGN                                                   !0, 'test%40gamil.com'
   28    15        CONCAT                                           ~10     !0, '+%3A+'
         16        INIT_FCALL                                               'outputemail'
         17        SEND_VAR                                                 !0
         18        DO_FCALL                                      0  $11     
         19        CONCAT                                           ~12     ~10, $11
         20        ECHO                                                     ~12
         21      > RETURN                                                   1

Function outputemail:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pJBaI
function name:  outputEmail
number of ops:  10
compiled vars:  !0 = $email, !1 = $valid
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL_BY_NAME                                       'isValidEmail'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !1, $2
    5     5      > JMPZ                                                     !1, ->8
    6     6    > > RETURN                                                   '1%0A'
          7*       JMP                                                      ->9
    9     8    > > RETURN                                                   '0%0A'
   11     9*     > RETURN                                                   null

End of function outputemail

Function isvalidemail:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pJBaI
function name:  isValidEmail
number of ops:  7
compiled vars:  !0 = $email
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1        INIT_FCALL                                               'filter_var'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 274
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
   15     6*     > RETURN                                                   null

End of function isvalidemail

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.4 ms | 1403 KiB | 18 Q