3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Validator { /** * Alleen decimale cijfers * * @param mixed $var * @return bool */ public static function onlyDigits($var) { return ctype_digit($var); } } // Tests var_dump( Validator::onlyDigits('abc') ); // Moet FALSE zijn var_dump( Validator::onlyDigits('123') ); // Moet TRUE zijn
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W2A93
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_STATIC_METHOD_CALL                                  'Validator', 'onlyDigits'
          2        SEND_VAL                                                 'abc'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   18     6        INIT_FCALL                                               'var_dump'
          7        INIT_STATIC_METHOD_CALL                                  'Validator', 'onlyDigits'
          8        SEND_VAL                                                 '123'
          9        DO_FCALL                                      0  $2      
         10        SEND_VAR                                                 $2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class Validator:
Function onlydigits:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W2A93
function name:  onlyDigits
number of ops:  6
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        INIT_FCALL                                               'ctype_digit'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
   13     5*     > RETURN                                                   null

End of function onlydigits

End of class Validator.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
129.21 ms | 1446 KiB | 15 Q