php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73905 operand problem
Submitted: 2017-01-10 11:58 UTC Modified: 2017-01-22 04:22 UTC
From: m dot honar at gmail dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 7.0.14 OS: ubuntu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
10 + 33 = ?
Subscribe to this entry?

 
 [2017-01-10 11:58 UTC] m dot honar at gmail dot com
Description:
------------
on all scripts language return false; but on php7.0.14 first cast to int and after check value :
 
    >>> echo (0 ==  '---')? 'true':'false'; 
    true
    >>> echo (0 ==  '1---')? 'true':'false'; 
    false

but this case === type checking operand:
 
    >>> echo (0 ===  '---')? 'true':'false'; 
    false



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-10 12:07 UTC] requinix@php.net
-Status: Open +Status: Feedback -Type: Documentation Problem +Type: Bug -Package: PHP Language Specification +Package: *General Issues
 [2017-01-10 12:07 UTC] requinix@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


Behavior has not changed. https://3v4l.org/DmW8j
 [2017-01-22 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 08:01:33 2024 UTC