3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "foobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisout"; $b = str_repeat("a", 300); echo "Static Var\n"; testCopy($a); echo "Dynamic Var\n"; testCopy($b); function testCopy($var) { echo memory_get_usage() . "\n"; $var = (string) $var; echo memory_get_usage() . "\n"; }

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.2.110.0150.00622.24
8.2.100.0150.00718.75
8.2.90.0150.00618.82
8.2.80.0130.01018.77
8.2.70.0160.00618.78
8.2.60.0140.00718.64
8.2.50.0100.01318.64
8.2.40.0230.00018.88
8.2.30.0170.00718.74
8.2.20.0110.01118.66
8.2.10.0090.01318.82
8.2.00.0200.00318.71
8.1.240.0130.01018.57
8.1.230.0130.01018.55
8.1.220.0130.00918.57
8.1.210.0140.00719.89
8.1.200.0150.00618.49
8.1.190.0070.01018.30
8.1.180.0130.01018.44
8.1.170.0100.00718.54
8.1.160.0170.00318.86
8.1.150.0130.00618.55
8.1.140.0060.00318.53
8.1.130.0160.00618.52
8.1.120.0100.00718.56
8.1.110.0220.00018.55
8.1.100.0070.01518.55
8.1.90.0090.01518.55
8.1.80.0220.00018.54
8.1.70.0100.01318.69
8.1.60.0090.00918.75
8.1.50.0110.01118.63
8.1.40.0100.00618.67
8.1.30.0120.00618.75
8.1.20.0120.00018.81
8.1.10.0030.00617.92
8.1.00.0020.00718.07
8.0.300.0140.00417.78
8.0.290.0030.00717.84
8.0.280.0060.00317.78
8.0.270.0060.00317.79
8.0.260.0030.00617.82
8.0.250.0040.00417.88
8.0.240.0040.00417.88
8.0.230.0060.00317.82
8.0.220.0060.00317.88
8.0.210.0050.00517.90
8.0.200.0180.00317.84
8.0.190.0090.00017.96
8.0.180.0100.00017.82
8.0.170.0100.00017.96
8.0.160.0030.01617.89
8.0.150.0120.00417.93
8.0.140.0030.00817.34
8.0.130.0060.00317.39
8.0.120.0040.00617.33
8.0.110.0050.00417.39
8.0.100.0070.00217.38
8.0.90.0060.00217.34
8.0.80.0030.00617.23
8.0.70.0060.00317.41
8.0.60.0050.00417.21
8.0.50.0070.00117.30
8.0.30.0070.00817.06
8.0.20.0050.00617.26
8.0.10.0060.00517.26
8.0.00.0070.00417.43
7.4.330.0000.00613.92
7.4.320.0060.00317.64
7.4.300.0060.00317.38
7.4.290.0090.00617.15
7.4.280.0000.00917.38
7.4.270.0080.00016.96
7.4.260.0030.00617.01
7.4.250.0060.00216.91
7.4.240.0040.00316.98
7.4.230.0050.00316.99
7.4.220.0040.00417.00
7.4.210.0030.00517.02
7.4.200.0060.00217.02
7.4.190.0050.00316.98
7.4.180.0030.00517.08
7.4.160.0070.00716.90
7.4.150.0060.00416.85
7.4.140.0080.00716.81
7.4.130.0060.00716.71
7.4.120.0060.00816.77
7.4.110.0100.00616.72
7.4.100.0100.00516.86
7.4.90.0110.00916.69
7.4.80.0160.00716.73
7.4.70.0180.00616.78
7.4.60.0140.00816.82
7.4.50.0190.00616.68
7.4.40.0170.00516.69
7.4.30.0150.00716.77
7.4.20.0170.00416.73
7.4.10.0170.00716.77
7.4.00.0110.00616.06
7.3.330.0130.00716.74
7.3.320.0240.00716.86
7.3.310.0220.00916.68
7.3.300.0300.00216.93
7.3.290.0220.00516.89
7.3.280.0230.00616.75
7.3.270.0180.00616.72
7.3.260.0160.00816.63
7.3.250.0210.00116.51
7.3.240.0190.00516.50
7.3.230.0170.00916.71
7.3.220.0200.00516.72
7.3.210.0180.00616.65
7.3.200.0160.01116.56
7.3.190.0130.01316.58
7.3.180.0180.00716.65
7.3.170.0180.00616.65
7.3.160.0170.00716.64
7.3.150.0210.00516.61
7.3.140.0200.00716.57
7.3.130.0190.00816.60
7.3.120.0140.00815.72
7.3.110.0110.00815.68
7.3.100.0140.00915.74
7.3.90.0120.00915.77
7.3.80.0130.00615.73
7.3.70.0100.01115.86
7.3.60.0130.00715.79
7.3.50.0130.00815.80
7.3.40.0120.00715.87
7.3.30.0100.00915.81
7.3.20.0140.00717.38
7.3.10.0110.00617.26
7.3.00.0080.00817.29
7.2.340.0110.01217.32
7.2.330.0270.00816.64
7.2.320.0260.00716.77
7.2.310.0190.01116.67
7.2.300.0200.00816.73
7.2.290.0200.00616.72
7.2.280.0260.00716.65
7.2.270.0260.00616.73
7.2.260.0260.00616.68
7.2.250.0160.00915.90
7.2.240.0150.00715.83
7.2.230.0120.01015.80
7.2.220.0170.00615.90
7.2.210.0140.00815.83
7.2.200.0160.00915.95
7.2.190.0130.00615.79
7.2.180.0110.01215.88
7.2.170.0140.00715.95
7.2.160.0160.00916.06
7.2.150.0150.00717.57
7.2.140.0150.00517.51
7.2.130.0130.00817.69
7.2.120.0120.01217.74
7.2.110.0160.00717.64
7.2.100.0140.00617.76
7.2.90.0120.00717.44
7.2.80.0150.00917.58
7.2.70.0150.00617.55
7.2.60.0140.00717.65
7.2.50.0150.00817.54
7.2.40.0130.00817.71
7.2.30.0140.00517.61
7.2.20.0140.00717.60
7.2.10.0180.00517.70
7.2.00.0090.01117.94
7.1.330.0260.00616.34
7.1.320.0110.00816.38
7.1.310.0150.00816.35
7.1.300.0110.00716.39
7.1.290.0140.00516.35
7.1.280.0130.00516.34
7.1.270.0100.00916.31
7.1.260.0090.00816.44
7.1.250.0130.00516.36
7.1.240.0160.00416.63
7.1.230.0160.00916.79
7.1.220.0250.00616.65
7.1.210.0160.00716.70
7.1.200.0260.00916.69
7.1.190.0170.00716.64
7.1.180.0150.00816.59
7.1.170.0160.00616.60
7.1.160.0150.00716.52
7.1.150.0160.00916.62
7.1.140.0220.00916.67
7.1.130.0140.00916.60
7.1.120.0180.00516.58
7.1.110.0170.00416.68
7.1.100.0140.01016.60
7.1.90.0210.00216.62
7.1.80.0210.00316.68
7.1.70.0180.00416.71
7.1.60.0150.00817.18
7.1.50.0130.01016.70
7.1.40.0180.00216.81
7.1.30.0110.00716.71
7.1.20.0140.00616.68
7.1.10.0120.00516.55
7.1.00.0140.01817.75
7.0.330.0180.00616.42
7.0.320.0150.00716.23
7.0.310.0140.00716.32
7.0.300.0130.00616.33
7.0.290.0140.00816.25
7.0.280.0150.00716.26
7.0.270.0100.01016.35
7.0.260.0130.00816.37
7.0.250.0160.00516.46
7.0.240.0180.00916.48
7.0.230.0120.00716.38
7.0.220.0140.00416.41
7.0.210.0110.00816.39
7.0.200.0120.00616.39
7.0.190.0230.00716.47
7.0.180.0130.00516.49
7.0.170.0130.00716.41
7.0.160.0130.01016.34
7.0.150.0140.00916.33
7.0.140.0160.01817.50
7.0.130.0140.00516.45
7.0.120.0140.00416.35
7.0.110.0130.00916.34
7.0.100.0150.00816.39
7.0.90.0170.00616.33
7.0.80.0150.00816.26
7.0.70.0160.02017.38
7.0.60.0140.01617.45
7.0.50.0120.02117.50
7.0.40.0120.02317.02
7.0.30.0350.01916.99
7.0.20.0110.02016.95
7.0.10.0100.01317.05
7.0.00.0110.01516.95
5.6.400.0140.00415.74
5.6.390.0110.00815.81
5.6.380.0090.01015.75
5.6.370.0110.00715.80
5.6.360.0160.00715.86
5.6.350.0130.00915.84
5.6.340.0140.00815.82
5.6.330.0230.00415.78
5.6.320.0120.01015.84
5.6.310.0150.00415.86
5.6.300.0130.00915.72
5.6.290.0140.00415.86
5.6.280.0110.02216.84
5.6.270.0150.00715.80
5.6.260.0150.00415.75
5.6.250.0140.00915.79
5.6.240.0110.00715.82
5.6.230.0130.00515.87
5.6.220.0080.02416.80
5.6.210.0080.02216.90
5.6.200.0120.01916.89
5.6.190.0120.02116.90
5.6.180.0080.01716.95
5.6.170.0110.02116.96
5.6.160.0090.02416.95
5.6.150.0080.02316.94
5.6.140.0100.02116.89
5.6.130.0190.01316.88
5.6.120.0130.02216.91
5.6.110.0120.02216.88
5.6.100.0160.02116.80
5.6.90.0110.02016.80
5.6.80.0120.02116.80
5.6.70.0120.01816.76
5.6.60.0090.01616.83
5.6.50.0190.01216.75
5.6.40.0090.01716.72
5.6.30.0110.01416.75
5.6.20.0110.01616.66
5.6.10.0140.01516.71
5.6.00.0130.01316.61
5.5.380.0120.00915.88
5.5.370.0100.00915.82
5.5.360.0120.02116.70
5.5.350.0100.02216.68
5.5.340.0100.01916.79
5.5.330.0100.01716.74
5.5.320.0160.02016.73
5.5.310.0150.01916.85
5.5.300.0100.01616.78
5.5.290.0110.02016.71
5.5.280.0140.02116.74
5.5.270.0090.02016.72
5.5.260.0100.02416.69
5.5.250.0090.02116.77
5.5.240.0090.02316.71
5.5.230.0110.01216.66
5.5.220.0100.01216.60
5.5.210.0080.01616.70
5.5.200.0120.01016.64
5.5.190.0110.01216.56
5.5.180.0120.01216.62
5.5.170.0130.00415.69
5.5.160.0070.01316.53
5.5.150.0100.01316.56
5.5.140.0070.01516.52
5.5.130.0100.01916.51
5.5.120.0080.02016.58
5.5.110.0090.01316.47
5.5.100.0090.01916.67
5.5.90.0080.02316.66
5.5.80.0100.01416.71
5.5.70.0110.01916.71
5.5.60.0100.01516.65
5.5.50.0070.02516.69
5.5.40.0120.01116.60
5.5.30.0080.01416.63
5.5.20.0070.01616.63
5.5.10.0070.01416.63
5.5.00.0110.01416.50
5.4.450.0080.01614.66
5.4.440.0050.02114.71
5.4.430.0050.01614.74
5.4.420.0060.01314.73
5.4.410.0080.01514.66
5.4.400.0070.02014.65
5.4.390.0050.02114.61
5.4.380.0060.01114.67
5.4.370.0070.01114.69
5.4.360.0050.01214.60
5.4.350.0070.01014.64
5.4.340.0060.01314.64
5.4.330.0140.00313.58
5.4.320.0040.02214.66
5.4.310.0060.01114.65
5.4.300.0060.01914.74
5.4.290.0070.01314.62
5.4.280.0060.01914.68
5.4.270.0060.01514.69
5.4.260.0070.01714.62
5.4.250.0060.01214.65
5.4.240.0080.01214.59
5.4.230.0070.01114.48
5.4.220.0060.01214.54
5.4.210.0070.01114.57
5.4.200.0120.00914.55
5.4.190.0050.01314.56
5.4.180.0080.01414.56
5.4.170.0090.00914.55
5.4.160.0070.01114.57
5.4.150.0080.01214.60
5.4.140.0080.01014.15
5.4.130.0060.01214.09
5.4.120.0090.00914.10
5.4.110.0050.01214.10
5.4.100.0040.01314.14
5.4.90.0090.00914.09
5.4.80.0060.01214.12
5.4.70.0050.01114.16
5.4.60.0070.01014.14
5.4.50.0080.01014.10
5.4.40.0060.00914.11
5.4.30.0070.01114.15
5.4.20.0070.01014.15
5.4.10.0110.00714.11
5.4.00.0080.00913.98
5.3.290.0070.02413.67
5.3.280.0060.01913.62
5.3.270.0050.01513.66
5.3.260.0090.01113.73
5.3.250.0090.01913.70
5.3.240.0090.01313.58
5.3.230.0090.01013.63
5.3.220.0060.01513.55
5.3.210.0070.01413.55
5.3.200.0060.02113.55
5.3.190.0090.01313.66
5.3.180.0080.01413.67
5.3.170.0090.01313.64
5.3.160.0070.01613.63
5.3.150.0060.01713.73
5.3.140.0060.01513.61
5.3.130.0080.01313.67
5.3.120.0080.01213.67
5.3.110.0090.01713.71
5.3.100.0080.01113.49
5.3.90.0080.01213.61
5.3.80.0080.01113.45
5.3.70.0110.01113.45
5.3.60.0040.01613.51
5.3.50.0080.01213.42
5.3.40.0100.01313.38
5.3.30.0070.01213.52
5.3.20.0080.02213.34
5.3.10.0070.02213.30
5.3.00.0060.01513.35

preferences:
30.86 ms | 403 KiB | 5 Q