Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Php80] Add get_debug_type() #226

Open
wants to merge 1 commit into
base: master
from

Conversation

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Feb 5, 2020

@nicolas-grekas nicolas-grekas force-pushed the nicolas-grekas:dbg_type branch from 2bf8337 to 5e06b24 Feb 5, 2020
@lyrixx
lyrixx approved these changes Feb 5, 2020
src/Php80/bootstrap.php Outdated Show resolved Hide resolved
@nicolas-grekas nicolas-grekas force-pushed the nicolas-grekas:dbg_type branch from 5e06b24 to 7216331 Feb 6, 2020
@nicolas-grekas

This comment has been minimized.

Copy link
Member Author

nicolas-grekas commented Feb 6, 2020

Now in sync with latest changes, including php/php-src#5153

case \is_int($value): return 'int';
case \is_float($value): return 'float';
case \is_object($value): break;
case $value instanceof \__PHP_Incomplete_Class: return '__PHP_Incomplete_Class';

This comment has been minimized.

Copy link
@guilliamxavier

guilliamxavier Feb 6, 2020

Contributor

It seems this line is not covered by the tests?


$class = \get_class($value);

if ("\0" !== ($class[15] ?? '')) {

This comment has been minimized.

Copy link
@guilliamxavier

guilliamxavier Feb 6, 2020

Contributor

I guess that 15 magic number is for \strlen('class@anonymous')? Will it need to be changed after php/php-src#5153? (forget that last question, this code won't be used in PHP 8.0+ of course)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.