3v4l.org

run code in 300+ PHP versions simultaneously
<?php $num = 0; function toggleNumber( $num ) { return $num ^= 1; } echo toggleNumber( $num );

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)
8.4.20.0100.01019.77
8.4.10.0340.00617.89
8.3.150.0060.01117.21
8.3.140.0250.00716.42
8.3.130.0210.00616.44
8.3.120.0170.00517.04
8.3.110.0190.00417.46
8.3.100.0260.00616.51
8.3.90.0230.00718.97
8.3.80.0280.00516.36
8.3.70.0270.00816.33
8.3.60.0270.00416.49
8.3.50.0290.00616.46
8.3.40.0230.00617.66
8.3.30.0160.01117.58
8.3.20.0220.00720.78
8.3.10.0150.00920.91
8.3.00.0150.00620.78
8.2.270.0140.00417.04
8.2.260.0220.00816.97
8.2.250.0210.00316.92
8.2.240.0180.01016.92
8.2.230.0190.00817.76
8.2.220.0240.00618.21
8.2.210.0210.00718.79
8.2.200.0170.01016.32
8.2.190.0260.00416.43
8.2.180.0230.00616.74
8.2.170.0230.01018.99
8.2.160.0210.01018.33
8.2.150.0230.00721.30
8.2.140.0130.00721.41
8.2.130.0170.01121.62
8.2.120.0190.00720.75
8.2.110.0150.00721.46
8.2.100.0250.00720.29
8.2.90.0220.00819.91
8.2.80.0230.00619.95
8.2.70.0260.00619.79
8.2.60.0200.00919.22
8.2.50.0230.00619.30
8.2.40.0170.00819.21
8.2.30.0190.00819.30
8.2.20.0210.00419.15
8.2.10.0190.00719.06
8.2.00.0180.00619.03
8.1.310.0250.00716.58
8.1.300.0240.00816.47
8.1.290.0220.00819.60
8.1.280.0230.00918.34
8.1.270.0210.00720.57
8.1.260.0220.00721.56
8.1.250.0210.00521.83
8.1.240.0220.00720.94
8.1.230.0240.00620.68
8.1.220.0190.00919.68
8.1.210.0210.00719.70
8.1.200.0180.00919.44
8.1.190.0190.00518.85
8.1.180.0200.00518.94
8.1.170.0190.00518.87
8.1.160.0190.00619.01
8.1.150.0190.00619.18
8.1.140.0170.00719.07
8.1.130.0190.00518.91
8.1.120.0190.00518.97
8.1.110.0170.00618.90
8.1.100.0170.00718.91
8.1.90.0170.00718.92
8.1.80.0190.00618.87
8.1.70.0170.00718.83
8.1.60.0210.00618.99
8.1.50.0190.00518.87
8.1.40.0200.00618.93
8.1.30.0220.00418.78
8.1.20.0190.00718.79
8.1.10.0200.00518.72
8.1.00.0190.00518.61
8.0.300.0190.00719.63
8.0.290.0220.00819.17
8.0.280.0160.00518.14
8.0.270.0160.00718.54
8.0.260.0190.00618.49
8.0.250.0170.00618.55
8.0.240.0190.00718.57
8.0.230.0190.00518.53
8.0.220.0170.00618.53
8.0.210.0200.00618.50
8.0.200.0170.00618.55
8.0.190.0200.00618.54
8.0.180.0190.00418.38
8.0.170.0200.00418.37
8.0.160.0170.00418.27
8.0.150.0160.00918.30
8.0.140.0180.00718.20
8.0.130.0160.00617.82
8.0.120.0170.00617.75
8.0.110.0150.00617.74
8.0.100.0160.00517.62
8.0.90.0160.00617.66
8.0.80.0140.00617.70
8.0.70.0150.00517.67
8.0.60.0170.00417.68
8.0.50.0160.00517.66
8.0.30.0140.00617.58
8.0.20.0140.00617.62
8.0.10.0160.00717.65
8.0.00.0140.00617.53
7.4.330.0150.00518.03
7.4.320.0200.00618.37
7.4.300.0180.00618.40
7.4.290.0180.00518.24
7.4.280.0210.00418.21
7.4.270.0170.00718.07
7.4.260.0200.00417.96
7.4.250.0180.00517.63
7.4.240.0160.00717.64
7.4.230.0180.00617.57
7.4.220.0170.00517.60
7.4.210.0150.00717.57
7.4.200.0170.00517.56
7.4.190.0160.00617.77
7.4.180.0170.00517.64
7.4.160.0140.00717.41
7.4.150.0160.00517.47
7.4.140.0150.00517.49
7.4.130.0150.00517.27
7.4.120.0140.00817.23
7.4.110.0160.00617.26
7.4.100.0160.00517.37
7.4.90.0160.00617.24
7.4.80.0150.00717.31
7.4.70.0150.00617.17
7.4.60.0160.00617.13
7.4.50.0170.00517.12
7.4.40.0150.00617.11
7.4.30.0160.00617.16
7.4.20.0140.00717.13
7.4.10.0150.00717.07
7.4.00.0140.00717.02
7.3.330.0180.00517.54
7.3.320.0180.00417.19
7.3.310.0180.00417.44
7.3.300.0170.00417.38
7.3.290.0140.00817.21
7.3.280.0160.00617.05
7.3.270.0160.00617.31
7.3.260.0160.00517.16
7.3.250.0160.00517.07
7.3.240.0150.00717.07
7.3.230.0160.00517.17
7.3.220.0170.00617.15
7.3.210.0150.00717.04
7.3.200.0150.00617.00
7.3.190.0170.00517.02
7.3.180.0160.00617.01
7.3.170.0160.00616.97
7.3.160.0160.00617.04
7.3.150.0160.00716.99
7.3.140.0150.00617.02
7.3.130.0150.00716.90
7.3.120.0130.00716.90
7.3.110.0140.00716.90
7.3.100.0140.00716.89
7.3.90.0130.00816.97
7.3.80.0140.00516.84
7.3.70.0150.00616.79
7.3.60.0130.00716.83
7.3.50.0150.00716.83
7.3.40.0150.00616.72
7.3.30.0140.00716.76
7.3.20.0170.00617.28
7.3.10.0150.00817.27
7.3.00.0150.00817.18
7.2.340.0150.00717.23
7.2.330.0170.00617.17
7.2.320.0180.00617.08
7.2.310.0170.00617.07
7.2.300.0160.00717.08
7.2.290.0160.00717.08
7.2.280.0150.00817.06
7.2.270.0160.00717.08
7.2.260.0150.00717.05
7.2.250.0150.00717.00
7.2.240.0140.00817.02
7.2.230.0130.00917.04
7.2.220.0140.00716.98
7.2.210.0150.00716.96
7.2.200.0160.00616.93
7.2.190.0160.00716.91
7.2.180.0150.00616.92
7.2.170.0140.00716.88
7.2.160.0130.00816.83
7.2.150.0160.00817.46
7.2.140.0170.00817.51
7.2.130.0170.00717.40
7.2.120.0160.00817.44
7.2.110.0160.00717.40
7.2.100.0170.00617.37
7.2.90.0170.00717.39
7.2.80.0180.00717.38
7.2.70.0170.00717.39
7.2.60.0250.00717.30
7.2.50.0230.00717.29
7.2.40.0290.00717.35
7.2.30.0250.00817.34
7.2.20.0220.00917.42
7.2.10.0230.00817.36
7.2.00.0200.00717.40
7.1.330.0180.00516.92
7.1.320.0170.00616.85
7.1.310.0180.00616.86
7.1.300.0160.00716.76
7.1.290.0150.00816.79
7.1.280.0160.00716.65
7.1.270.0180.00616.68
7.1.260.0160.00716.67
7.1.250.0160.00716.50
7.1.240.0170.00716.52
7.1.230.0160.00816.54
7.1.220.0160.00716.53
7.1.210.0160.00916.53
7.1.200.0180.00616.50
7.1.190.0180.00716.55
7.1.180.0160.00716.53
7.1.170.0250.00716.39
7.1.160.0230.00716.53
7.1.150.0250.00716.54
7.1.140.0220.00716.55
7.1.130.0220.00716.54
7.1.120.0220.00616.58
7.1.110.0210.00616.54
7.1.100.0220.00716.51
7.1.90.0210.00716.54
7.1.80.0200.00716.58
7.1.70.0200.00716.44
7.1.60.0230.00618.23
7.1.50.0220.00718.18
7.1.40.0240.00818.14
7.1.30.0220.00818.17
7.1.20.0210.00718.13
7.1.10.0210.00616.42
7.1.00.0190.00716.40
7.0.330.0170.00616.30
7.0.320.0170.00616.26
7.0.310.0150.00716.27
7.0.300.0230.00716.20
7.0.290.0250.00616.25
7.0.280.0160.00716.28
7.0.270.0210.00616.29
7.0.260.0220.00716.36
7.0.250.0200.00716.33
7.0.240.0200.00816.33
7.0.230.0200.00716.38
7.0.220.0220.00616.34
7.0.210.0210.00616.23
7.0.200.0210.00716.25
7.0.190.0200.00616.23
7.0.180.0240.00816.19
7.0.170.0240.00616.20
7.0.160.0190.00716.19
7.0.150.0190.00816.14
7.0.140.0210.00716.18
7.0.130.0170.00716.24
7.0.120.0180.00816.23
7.0.110.0210.00716.18
7.0.100.0240.00616.18
7.0.90.0200.00716.17
7.0.80.0210.00716.17
7.0.70.0180.00716.15
7.0.60.0180.00716.14
7.0.50.0190.00716.17
7.0.40.0230.00716.20
7.0.30.0200.00616.22
7.0.20.0200.00616.18
7.0.10.0170.00816.21
7.0.00.0180.00716.17
5.6.400.0140.01216.39
5.6.390.0140.01116.38
5.6.380.0140.01216.34
5.6.370.0140.01216.65
5.6.360.0140.01216.63
5.6.350.0160.00916.65
5.6.340.0140.01216.69
5.6.330.0150.01216.66
5.6.320.0150.01116.64
5.6.310.0130.01416.63
5.6.300.0150.01116.54
5.6.290.0150.01216.66
5.6.280.0160.01116.65
5.6.270.0120.01416.64
5.6.260.0160.01116.64
5.6.250.0160.01016.63
5.6.240.0150.01016.64
5.6.230.0160.01216.66
5.6.220.0170.01016.69
5.6.210.0150.01216.68
5.6.200.0140.01216.70
5.6.190.0150.01116.69
5.6.180.0150.01216.65
5.6.170.0160.01116.68
5.6.160.0150.01316.67
5.6.150.0140.01316.66
5.6.140.0140.01316.64
5.6.130.0150.01116.67
5.6.120.0150.00916.61
5.6.110.0150.01116.61
5.6.100.0130.01216.61
5.6.90.0140.01216.65
5.6.80.0120.01316.61
5.6.70.0120.01316.69
5.6.60.0130.01016.68
5.6.50.0120.01116.66
5.6.40.0130.01216.64
5.6.30.0120.01216.60
5.6.20.0140.01016.62
5.6.10.0130.01416.65
5.6.00.0150.01016.60

preferences:
83.2 ms | 403 KiB | 5 Q