3v4l.org

run code in 300+ PHP versions simultaneously
<?php function diff($this, $that){ $this = deg2rad($this); $that = deg2rad($that); if($this<0)$this += M_PI_2; if($that<0)$that += M_PI_2; $diff = abs($this-$that ); $diff = min( M_PI_2 - $diff, $diff); echo rad2deg($diff) .PHP_EOL; } diff(-1,1);//2 diff(-90,90);//180 diff(-179,179);//2

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).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.320.0470.04319.20
5.4.310.0930.03718.86
5.4.300.0430.03718.95
5.4.290.0370.03719.13
5.4.280.0270.04319.16
5.4.270.0500.04019.06
5.4.260.1000.03019.03
5.4.250.0530.04319.13
5.4.240.0870.02719.13
5.4.230.0530.04719.13
5.4.220.0830.03718.97
5.4.210.0730.03319.21
5.4.200.0600.03019.09
5.4.190.0430.04018.95
5.4.180.0330.03318.94
5.4.170.0700.03019.21
5.4.160.1000.02719.11
5.4.150.0700.04318.84
5.4.140.0730.04316.49
5.4.130.0670.03316.50
5.4.120.0730.03016.37
5.4.110.0630.04016.21
5.4.100.0530.04016.54
5.4.90.0770.04316.45
5.4.80.0270.03716.48
5.4.70.0230.04016.54
5.4.60.0770.03316.52
5.4.50.0630.03316.36
5.4.40.0530.04016.49
5.4.30.0800.02716.32
5.4.20.0670.03716.24
5.4.10.0500.04316.40
5.4.00.0470.05016.20
5.3.290.0830.03016.21
5.3.280.0470.03316.21
5.3.270.0170.04716.21
5.3.260.0700.04316.21
5.3.250.0530.04016.21
5.3.240.0430.04316.21
5.3.230.0200.05016.21
5.3.220.0670.04016.21
5.3.210.0400.04316.21
5.3.200.0430.04316.21
5.3.190.0870.04016.21
5.3.180.0800.04016.21
5.3.170.0400.04016.21
5.3.160.0930.02716.20
5.3.150.0730.05016.20
5.3.140.0630.04016.20
5.3.130.0570.03016.20
5.3.120.0870.03316.20
5.3.110.0700.03316.20
5.3.100.0600.06316.20
5.3.90.0430.04716.20
5.3.80.0600.04316.20
5.3.70.0570.04016.20
5.3.60.0530.03316.20
5.3.50.0300.04016.20
5.3.40.0470.03016.20
5.3.30.0670.04016.20
5.3.20.0470.03716.20
5.3.10.0800.04016.20
5.3.00.0730.03316.20
5.2.170.0570.03316.20
5.2.160.0770.02016.20
5.2.150.0470.03716.20
5.2.140.0670.02316.20
5.2.130.0530.03016.20
5.2.120.0600.03316.20
5.2.110.0600.03016.20
5.2.100.0500.02716.20
5.2.90.0570.02716.20
5.2.80.0400.03016.20
5.2.70.0430.03716.20
5.2.60.0570.02316.20
5.2.50.0370.02716.20
5.2.40.0330.06016.20
5.2.30.0270.04016.20
5.2.20.0570.02716.20
5.2.10.0500.02316.20
5.2.00.0270.02716.20
5.1.60.0370.02316.20
5.1.50.0400.02016.20
5.1.40.0430.02716.20
5.1.30.0330.02316.20
5.1.20.0330.02716.20
5.1.10.0270.02716.20
5.1.00.0200.02716.20
5.0.50.0200.01716.20
5.0.40.0130.01316.20
5.0.30.0170.02716.20
5.0.20.0100.01316.20
5.0.10.0130.01716.20
5.0.00.0170.03016.20
4.4.90.0130.02016.20
4.4.80.0300.01716.20
4.4.70.0130.01016.20
4.4.60.0030.01716.20
4.4.50.0100.01716.20
4.4.40.0070.02016.20
4.4.30.0100.01716.20
4.4.20.0270.00316.20
4.4.10.0200.01016.20
4.4.00.0070.02316.20
4.3.110.0070.02016.20
4.3.100.0170.01716.20
4.3.90.0170.01316.20
4.3.80.0000.02316.20
4.3.70.0200.01716.20
4.3.60.0270.01316.20
4.3.50.0200.00716.20
4.3.40.0230.02016.20
4.3.30.0100.01016.20
4.3.20.0200.01316.20
4.3.10.0100.02016.20
4.3.00.0100.01716.20

preferences:
141.78 ms | 1394 KiB | 7 Q