3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); $resource = fopen('php://stdin', 'r'); $values = [ 'int' => 5, 'string' => '5', 'float' => 5.0, 'bool' => true, 'array' => [5], 'object' => new stdClass(), 'null' => null, 'resource' => $resource, ]; foreach ($values as $v1) { foreach ($values as $v2) { var_dump($v1 <=> $v2); } }
Output for git.master_jit, git.master, rfc.property-hooks
int(0) int(0) int(0) int(0) int(-1) Notice: Object of class stdClass could not be converted to int in /in/FVeq7 on line 17 int(1) int(1) int(0) int(0) int(0) int(0) int(0) int(-1) int(-1) int(1) int(0) int(0) int(0) int(0) int(0) int(-1) Notice: Object of class stdClass could not be converted to float in /in/FVeq7 on line 17 int(1) int(1) int(0) int(0) int(0) int(0) int(0) int(0) int(0) int(1) int(0) int(1) int(1) int(1) int(0) int(0) int(-1) int(1) int(1) Notice: Object of class stdClass could not be converted to int in /in/FVeq7 on line 17 int(-1) int(1) Notice: Object of class stdClass could not be converted to float in /in/FVeq7 on line 17 int(-1) int(0) int(1) int(0) int(1) int(1) int(-1) int(-1) int(-1) int(-1) int(-1) int(-1) int(0) int(-1) int(0) int(0) int(0) int(0) int(-1) int(-1) int(1) int(0)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
81.75 ms | 407 KiB | 5 Q