3v4l.org

run code in 300+ PHP versions simultaneously
<?php class NotBlankValidator implements ValidatorRuleInterface { private string $errorText = "Это поле обязательно для заполнения."; public function __invoke (mixed $value): ?ValidationError { $numberOfCharacters = iconv_strlen($value); return ($numberOfCharacters===0) ? new ValidationError($this->errorText) : null; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TMHPR
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'notblankvalidator'
   14     1      > RETURN                                                   1

Class NotBlankValidator:
Function __invoke:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TMHPR
function name:  __invoke
number of ops:  19
compiled vars:  !0 = $value, !1 = $numberOfCharacters
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        INIT_FCALL_BY_NAME                                       'iconv_strlen'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !1, $2
   11     5        IS_IDENTICAL                                             !1, 0
          6      > JMPZ                                                     ~4, ->14
          7    >   NEW                                              $5      'ValidationError'
          8        CHECK_FUNC_ARG                                           
          9        FETCH_OBJ_FUNC_ARG                               $6      'errorText'
         10        SEND_FUNC_ARG                                            $6
         11        DO_FCALL                                      0          
         12        QM_ASSIGN                                        ~8      $5
         13      > JMP                                                      ->15
         14    >   QM_ASSIGN                                        ~8      null
         15    >   VERIFY_RETURN_TYPE                                       ~8
         16      > RETURN                                                   ~8
   12    17*       VERIFY_RETURN_TYPE                                       
         18*     > RETURN                                                   null

End of function __invoke

End of class NotBlankValidator.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.5 ms | 995 KiB | 13 Q