Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Proof of concept where `strict_types` affects `==` and `!=` operators
<?php
var_dump("1" == 1);
var_dump("1" != 1);
<?php
declare(strict_types=1);
var_dump("1" == 1);
var_dump("1" != 1);
<?php
// Test for https://github.com/jasny/php-src/tree/strict_types-affect-operators-test
echo "== STANDARD ==\n";
include 'poc-standard.php';
echo "\n";
echo "== STRICT ==\n";
require 'poc-strict.php';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment