3v4l.org

run code in 300+ PHP versions simultaneously
<?php $payloads = [ 'a' => [null, null, null, null, null], 'b' => [null, null, 1, null, null] ]; foreach ($payloads as $key => $payload) { printf( "%s: %s, %s, %s\n", $key, var_export( array_reduce( $payload, function ($acc, $value) { return $acc && $value === null; }, true ), true ), var_export( !array_filter( $payload, function ($value) { return $value !== null; } ), true ), var_export( $payload === array_filter($payload, 'is_null'), true ) ); }
Output for git.master, git.master_jit, rfc.property-hooks
a: true, true, true b: false, false, false

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:
28.66 ms | 405 KiB | 5 Q