3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // $a = ['a' => 1, 'c' => 1]; // var_dump(isset($a['a']) && isset($a['b'])); // var_dump(isset($a['a'], $a['b'])); // // die(); // var_dump(!isset($a['a']) && !isset($a['b'])); // var_dump(!isset($a['a'], $a['b'])); // die(); // $params = ['form_params' => ['azaz' => 1]]; // var_dump(!isset( // $params['multipart'], // $params['json'], // $params['body'], // $params['form_params'] // )); // die(); $params = ['form_params' => ['azaz' => 1]]; if (!(isset( $params['multipart'], $params['json'], $params['body'], $params['form_params'] ))) { $params = ['form_params' => $params]; } var_dump($params); // if (!isset($params['multipart']) && // !isset($params['json']) && // !isset($params['body']) && // !isset($params['form_params']) // ) { // $params = ['form_params' => $params]; // } var_dump($params);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.3.0alpha10.0890.00010.70