3v4l.org

run code in 300+ PHP versions simultaneously
<?php $grades=array(-4,-1,0,1,6,10,70,99,100,101,105,110); foreach($grades as $grade){ if( ($grade+1)*(101-$grade) > 0 ){ // ($grade minus negative [lower limit])*([upper limit] plus $grad) $validGrades[] = $grade; }else{ $invalidGrades[] = $grade; } } var_export($validGrades); var_export($invalidGrades);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 0, 1 => 1, 2 => 6, 3 => 10, 4 => 70, 5 => 99, 6 => 100, )array ( 0 => -4, 1 => -1, 2 => 101, 3 => 105, 4 => 110, )

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:
57.12 ms | 401 KiB | 8 Q