3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function doSetPixels($cookie, $ssid, $fetchPixels, $sson_ssid, $loggedIn) { $isCookieMissing = $loggedIn && $cookie===null && $ssid; $isExplicitRequest = !is_null($fetchPixels); $sapSessionDiffers = !$sson_ssid || $sson_ssid !== $ssid; $setPixels = ( $isExplicitRequest || $isCookieMissing ) && $sapSessionDiffers; return $setPixels; } function simpler($c,$s,$f) { return doSetPixels($c,$s,null,$f,false); } var_dump(simpler(12,13,15)); var_dump(simpler(12,12,12)); var_dump(simpler(12,12,15)); var_dump(simpler(12,13,12)); var_dump(simpler(12,15,15)); var_dump(simpler(null,null,null)); var_dump(simpler(12,null,null)); var_dump(simpler(null,13,null)); var_dump(simpler(null,13,15)); var_dump(simpler(12,13,null)); var_dump(simpler(null,13,15)); var_dump(simpler(12,null,13));
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false)