3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Assert { /** * @param int $value * * @return self */ public static function unsignedInt(int $value) : string { if (0 > $value) { throw new InvalidArgumentException('Значение должно быть не отрицательным.'); } return __CLASS__; } /** * @param int $value * * @return self */ public static function notZeroInt(int $value) : string { if (0 === $value) { throw new InvalidArgumentException('Значение должно быть не равным нолю.'); } return __CLASS__; } /** * @param float $value * * @return self */ public static function unsignedFloat(float $value) : string { if (0 > $value) { throw new InvalidArgumentException('Значение должно быть не отрицательным.'); } return __CLASS__; } /** * @param float $value * * @return self */ public static function notZeroFloat(float $value) : string { if (0 === $value) { throw new InvalidArgumentException('Значение должно быть не равным нолю.'); } return __CLASS__; } /** * @param string $value * * @return self */ public static function notEmptyString(string $value) : string { if ('' === $value) { throw new InvalidArgumentException('Значение должно быть не пустой строкой'); } return __CLASS__; } } Assert::notZeroInt(3)::unsignedInt(3); Assert::notZeroInt(0)::unsignedInt(0);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AsP8p
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   76     0  E >   INIT_STATIC_METHOD_CALL                                  'Assert', 'notZeroInt'
          1        SEND_VAL                                                 3
          2        DO_FCALL                                      0  $0      
          3        FETCH_CLASS                                   0  $1      $0
          4        INIT_STATIC_METHOD_CALL                                  $1, 'unsignedInt'
          5        SEND_VAL_EX                                              3
          6        DO_FCALL                                      0          
   77     7        INIT_STATIC_METHOD_CALL                                  'Assert', 'notZeroInt'
          8        SEND_VAL                                                 0
          9        DO_FCALL                                      0  $3      
         10        FETCH_CLASS                                   0  $4      $3
         11        INIT_STATIC_METHOD_CALL                                  $4, 'unsignedInt'
         12        SEND_VAL_EX                                              0
         13        DO_FCALL                                      0          
         14      > RETURN                                                   1

Class Assert:
Function unsignedint:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AsP8p
function name:  unsignedInt
number of ops:  10
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        IS_SMALLER                                               !0, 0
          2      > JMPZ                                                     ~1, ->7
   13     3    >   NEW                                              $2      'InvalidArgumentException'
          4        SEND_VAL_EX                                              '%D0%97%D0%BD%D0%B0%D1%87%D0%B5%D0%BD%D0%B8%D0%B5+%D0%B4%D0%BE%D0%BB%D0%B6%D0%BD%D0%BE+%D0%B1%D1%8B%D1%82%D1%8C+%D0%BD%D0%B5+%D0%BE%D1%82%D1%80%D0%B8%D1%86%D0%B0%D1%82%D0%B5%D0%BB%D1%8C%D0%BD%D1%8B%D0%BC.'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $2
   16     7    > > RETURN                                                   'Assert'
   17     8*       VERIFY_RETURN_TYPE                                       
          9*     > RETURN                                                   null

End of function unsignedint

Function notzeroint:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AsP8p
function name:  notZeroInt
number of ops:  10
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
   26     1        IS_IDENTICAL                                             !0, 0
          2      > JMPZ                                                     ~1, ->7
   27     3    >   NEW                                              $2      'InvalidArgumentException'
          4        SEND_VAL_EX                                              '%D0%97%D0%BD%D0%B0%D1%87%D0%B5%D0%BD%D0%B8%D0%B5+%D0%B4%D0%BE%D0%BB%D0%B6%D0%BD%D0%BE+%D0%B1%D1%8B%D1%82%D1%8C+%D0%BD%D0%B5+%D1%80%D0%B0%D0%B2%D0%BD%D1%8B%D0%BC+%D0%BD%D0%BE%D0%BB%D1%8E.'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $2
   30     7    > > RETURN                                                   'Assert'
   31     8*       VERIFY_RETURN_TYPE                                       
          9*     > RETURN                                                   null

End of function notzeroint

Function unsignedfloat:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AsP8p
function name:  unsignedFloat
number of ops:  10
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   RECV                                             !0      
   40     1        IS_SMALLER                                               !0, 0
          2      > JMPZ                                                     ~1, ->7
   41     3    >   NEW                                              $2      'InvalidArgumentException'
          4        SEND_VAL_EX                                              '%D0%97%D0%BD%D0%B0%D1%87%D0%B5%D0%BD%D0%B8%D0%B5+%D0%B4%D0%BE%D0%BB%D0%B6%D0%BD%D0%BE+%D0%B1%D1%8B%D1%82%D1%8C+%D0%BD%D0%B5+%D0%BE%D1%82%D1%80%D0%B8%D1%86%D0%B0%D1%82%D0%B5%D0%BB%D1%8C%D0%BD%D1%8B%D0%BC.'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $2
   44     7    > > RETURN                                                   'Assert'
   45     8*       VERIFY_RETURN_TYPE                                       
          9*     > RETURN                                                   null

End of function unsignedfloat

Function notzerofloat:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AsP8p
function name:  notZeroFloat
number of ops:  10
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   52     0  E >   RECV                                             !0      
   54     1        IS_IDENTICAL                                             !0, 0
          2      > JMPZ                                                     ~1, ->7
   55     3    >   NEW                                              $2      'InvalidArgumentException'
          4        SEND_VAL_EX                                              '%D0%97%D0%BD%D0%B0%D1%87%D0%B5%D0%BD%D0%B8%D0%B5+%D0%B4%D0%BE%D0%BB%D0%B6%D0%BD%D0%BE+%D0%B1%D1%8B%D1%82%D1%8C+%D0%BD%D0%B5+%D1%80%D0%B0%D0%B2%D0%BD%D1%8B%D0%BC+%D0%BD%D0%BE%D0%BB%D1%8E.'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $2
   58     7    > > RETURN                                                   'Assert'
   59     8*       VERIFY_RETURN_TYPE                                       
          9*     > RETURN                                                   null

End of function notzerofloat

Function notemptystring:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AsP8p
function name:  notEmptyString
number of ops:  10
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   66     0  E >   RECV                                             !0      
   68     1        IS_IDENTICAL                                             !0, ''
          2      > JMPZ                                                     ~1, ->7
   69     3    >   NEW                                              $2      'InvalidArgumentException'
          4        SEND_VAL_EX                                              '%D0%97%D0%BD%D0%B0%D1%87%D0%B5%D0%BD%D0%B8%D0%B5+%D0%B4%D0%BE%D0%BB%D0%B6%D0%BD%D0%BE+%D0%B1%D1%8B%D1%82%D1%8C+%D0%BD%D0%B5+%D0%BF%D1%83%D1%81%D1%82%D0%BE%D0%B9+%D1%81%D1%82%D1%80%D0%BE%D0%BA%D0%BE%D0%B9'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $2
   72     7    > > RETURN                                                   'Assert'
   73     8*       VERIFY_RETURN_TYPE                                       
          9*     > RETURN                                                   null

End of function notemptystring

End of class Assert.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.16 ms | 1004 KiB | 13 Q