3v4l.org

run code in 300+ PHP versions simultaneously
<?php $location = 'Boston, MA'; $comma = strpos($location,','); $city = substr($location,0,$comma); $state = substr($location,$comma); echo $city; echo '<br>'; echo $state; ?>

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.3.60.0120.00916.25
8.3.50.0070.01121.99
8.3.40.0070.00718.67
8.3.30.0140.00019.00
8.3.20.0040.00420.02
8.3.10.0040.00423.67
8.3.00.0040.00717.63
8.2.180.0100.00718.30
8.2.170.0100.01022.96
8.2.160.0100.00320.28
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0150.00026.16
8.2.120.0040.00422.25
8.2.110.0000.00922.00
8.2.100.0090.00317.78
8.2.90.0050.00317.91
8.2.80.0080.00017.97
8.2.70.0040.00417.50
8.2.60.0040.00417.93
8.2.50.0050.00318.07
8.2.40.0050.00317.92
8.2.30.0000.00717.99
8.2.20.0040.00417.72
8.2.10.0040.00417.67
8.2.00.0040.00417.78
8.1.280.0140.00025.92
8.1.270.0140.00723.87
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0040.01822.59
8.1.230.0040.00820.75
8.1.220.0030.00517.79
8.1.210.0080.00018.91
8.1.200.0100.00017.23
8.1.190.0040.00417.41
8.1.180.0040.00418.10
8.1.170.0070.00318.50
8.1.160.0050.00521.86
8.1.150.0000.00718.44
8.1.140.0070.00017.38
8.1.130.0040.00417.82
8.1.120.0020.00517.39
8.1.110.0030.00517.37
8.1.100.0080.00317.37
8.1.90.0000.00717.39
8.1.80.0080.00017.28
8.1.70.0030.00317.38
8.1.60.0060.00317.43
8.1.50.0000.00817.46
8.1.40.0000.00717.51
8.1.30.0080.00017.43
8.1.20.0040.00417.58
8.1.10.0000.00817.39
8.1.00.0030.00517.40
8.0.300.0030.00520.03
8.0.290.0040.00417.18
8.0.280.0050.00318.37
8.0.270.0000.00817.16
8.0.260.0000.00616.88
8.0.250.0070.00016.94
8.0.240.0080.00016.96
8.0.230.0030.00316.83
8.0.220.0050.00216.88
8.0.210.0000.00716.82
8.0.200.0030.00316.91
8.0.190.0040.00416.89
8.0.180.0000.00716.84
8.0.170.0070.00016.90
8.0.160.0000.00716.63
8.0.150.0040.00416.74
8.0.140.0040.00416.69
8.0.130.0030.00613.21
8.0.120.0000.00916.71
8.0.110.0030.00316.82
8.0.100.0040.00416.68
8.0.90.0070.00016.91
8.0.80.0070.01016.87
8.0.70.0070.00016.88
8.0.60.0070.00016.78
8.0.50.0040.00416.65
8.0.30.0100.00916.91
8.0.20.0130.01017.40
8.0.10.0070.00016.91
8.0.00.0120.01116.61
7.4.330.0000.00515.13
7.4.320.0030.00316.47
7.4.300.0050.00216.44
7.4.290.0080.00016.36
7.4.280.0030.00316.42
7.4.270.0000.00716.46
7.4.260.0030.00316.31
7.4.250.0040.00416.39
7.4.240.0060.00216.49
7.4.230.0070.00016.46
7.4.220.0150.00416.54
7.4.210.0050.01216.44
7.4.200.0000.00716.32
7.4.190.0000.00716.57
7.4.160.0060.01316.38
7.4.150.0120.00717.40
7.4.140.0060.01317.86
7.4.130.0100.00716.39
7.4.120.0090.01216.39
7.4.110.0090.00916.39
7.4.100.0110.00716.40
7.4.90.0100.00716.35
7.4.80.0130.00919.39
7.4.70.0150.00716.34
7.4.60.0160.00616.48
7.4.50.0000.00916.26
7.4.40.0070.00722.77
7.4.30.0000.01516.41
7.4.00.0040.01414.72
7.3.330.0000.00513.04
7.3.320.0030.00312.98
7.3.310.0030.00316.33
7.3.300.0000.00616.22
7.3.290.0090.00616.29
7.3.280.0100.01016.21
7.3.270.0100.00717.40
7.3.260.0120.00616.38
7.3.250.0090.00816.24
7.3.240.0150.00316.18
7.3.230.0070.01016.39
7.3.210.0070.01016.43
7.3.200.0140.00619.39
7.3.190.0090.00916.40
7.3.180.0090.01316.45
7.3.170.0160.00616.27
7.3.160.0120.00516.30
7.3.120.0060.00914.51
7.3.10.0110.00316.54
7.3.00.0030.00816.58
7.2.330.0070.01016.48
7.2.320.0140.00316.36
7.2.310.0130.00416.48
7.2.300.0090.00916.66
7.2.290.0120.00916.58
7.2.130.0070.00516.80
7.2.120.0030.00716.82
7.2.110.0060.00616.79
7.2.100.0050.00616.91
7.2.90.0060.00816.86
7.2.80.0050.01016.91
7.2.70.0030.00617.03
7.2.60.0050.01016.65
7.2.50.0050.00816.81
7.2.40.0070.00716.81
7.2.30.0070.00616.88
7.2.20.0070.00816.90
7.2.10.0040.01016.88
7.2.00.0030.00917.71
7.1.250.0050.00715.78
7.1.240.0060.00615.87
7.1.230.0060.00615.74
7.1.220.0080.00415.93
7.1.210.0100.00415.51
7.1.200.0030.01015.75
7.1.190.0070.00715.88
7.1.180.0070.00415.79
7.1.170.0030.00715.61
7.1.160.0030.00915.53
7.1.150.0030.00715.66
7.1.140.0080.00415.48
7.1.130.0030.00915.89
7.1.120.0030.00715.66
7.1.110.0030.00715.63
7.1.100.0030.01016.96
7.1.90.0060.00915.96
7.1.80.0070.00315.97
7.1.70.0020.01016.42
7.1.60.0040.01117.62
7.1.50.0130.00725.20
7.1.40.0030.00715.82
7.1.30.0030.00915.61
7.1.20.0060.01015.75
7.1.10.0030.00615.59
7.1.00.0080.04219.21
7.0.330.0000.01315.29
7.0.320.0030.00715.29
7.0.310.0070.00315.44
7.0.300.0040.00415.34
7.0.290.0030.00615.46
7.0.280.0000.01415.34
7.0.270.0030.00915.61
7.0.260.0030.00715.44
7.0.250.0070.00315.41
7.0.240.0030.00915.13
7.0.230.0000.01015.34
7.0.220.0070.00315.45
7.0.210.0030.00615.04
7.0.200.0060.00616.08
7.0.190.0030.00615.33
7.0.180.0030.01015.41
7.0.170.0090.00315.15
7.0.160.0070.00715.49
7.0.150.0030.01015.54
7.0.140.0050.03818.70
7.0.130.0030.00615.34
7.0.120.0090.00315.51
7.0.110.0050.02917.60
7.0.100.0070.03317.67
7.0.90.0050.04217.75
7.0.80.0040.02917.57
7.0.70.0020.04417.59
7.0.60.0030.04317.73
7.0.50.0090.04217.86
7.0.40.0130.03016.96
7.0.30.0070.03516.86
7.0.20.0020.03216.88
7.0.10.0090.04316.84
7.0.00.0070.04316.86
5.6.380.0000.01014.32
5.6.370.0080.00314.45
5.6.360.0040.00814.30
5.6.350.0060.00613.91
5.6.340.0050.00514.12
5.6.330.0070.00313.96
5.6.320.0000.01414.03
5.6.310.0070.00314.14
5.6.300.0070.00714.29
5.6.290.0000.00814.51
5.6.280.0040.04117.50
5.6.270.0000.00914.39
5.6.260.0110.03717.45
5.6.250.0030.03017.54
5.6.240.0100.03917.28
5.6.230.0060.03817.40
5.6.220.0070.02917.42
5.6.210.0030.04717.50
5.6.200.0080.04317.46
5.6.190.0090.04117.73
5.6.180.0080.04017.75
5.6.170.0060.04517.71
5.6.160.0080.02517.65
5.6.150.0050.04717.70
5.6.140.0090.04517.64
5.6.130.0070.02717.75
5.6.120.0070.04517.57
5.6.110.0140.03617.64
5.6.100.0120.02317.76
5.6.90.0050.04317.68
5.6.80.0080.04217.31
5.6.70.0030.04517.37
5.6.60.0100.04017.20
5.6.50.0090.03917.34
5.6.40.0080.02917.26
5.6.30.0050.04517.40
5.6.20.0100.04017.09
5.6.10.0070.04417.32
5.6.00.0070.02517.28
5.5.380.0050.04315.86
5.5.370.0080.02315.84
5.5.360.0050.04315.80
5.5.350.0090.04015.84
5.5.340.0030.04515.96
5.5.330.0120.03815.99
5.5.320.0050.04115.92
5.5.310.0050.03315.99
5.5.300.0020.03016.00
5.5.290.0020.05016.10
5.5.280.0110.03515.97
5.5.270.0050.04015.98
5.5.260.0060.02816.05
5.5.250.0100.03015.97
5.5.240.0070.04115.76
5.5.230.0080.03815.73
5.5.220.0030.04215.76
5.5.210.0030.04615.77
5.5.200.0000.04515.77
5.5.190.0100.03815.68
5.5.180.0070.03215.69
5.5.170.0000.01011.18
5.5.160.0070.03715.74
5.5.150.0000.04715.73
5.5.140.0070.04115.65
5.5.130.0050.04415.75
5.5.120.0080.04015.70
5.5.110.0060.04215.66
5.5.100.0040.04315.58
5.5.90.0070.03615.70
5.5.80.0070.03515.69
5.5.70.0000.04215.70
5.5.60.0020.04315.60
5.5.50.0030.03915.60
5.5.40.0050.04015.69
5.5.30.0030.04415.61
5.5.20.0050.02815.60
5.5.10.0080.04015.60
5.5.00.0090.03715.60
5.4.450.0030.03615.31
5.4.440.0060.04015.25
5.4.430.0050.04215.34
5.4.420.0080.03515.34
5.4.410.0040.03115.18
5.4.400.0110.02015.10
5.4.390.0030.04115.22
5.4.380.0080.03815.16
5.4.370.0090.03715.06
5.4.360.0040.04515.09
5.4.350.0050.03915.15
5.4.340.0050.04115.09
5.4.330.0040.00411.18
5.4.320.0050.04215.13
5.4.310.0030.03915.17
5.4.300.0030.03915.21
5.4.290.0050.04015.08
5.4.280.0080.03715.18
5.4.270.0080.03815.21
5.4.260.0050.04015.18
5.4.250.0020.04515.08
5.4.240.0040.04615.22
5.4.230.0050.04015.17
5.4.220.0050.04115.12
5.4.210.0090.03815.09
5.4.200.0000.04715.08
5.4.190.0050.04215.07
5.4.180.0110.03515.17
5.4.170.0060.04115.15
5.4.160.0070.02715.13
5.4.150.0090.03315.05
5.4.140.0100.03313.69
5.4.130.0000.04213.67
5.4.120.0070.04013.64
5.4.110.0030.04313.78
5.4.100.0030.04013.79
5.4.90.0030.03613.75
5.4.80.0050.04013.76
5.4.70.0020.03313.79
5.4.60.0120.02813.84
5.4.50.0090.03813.67
5.4.40.0050.04213.86
5.4.30.0070.03513.71
5.4.20.0100.03413.84
5.4.10.0020.04113.75
5.4.00.0070.03213.49
5.3.290.0010.02712.95
5.3.280.0060.03812.84
5.3.270.0090.03312.84
5.3.260.0100.03512.82
5.3.250.0050.04012.84
5.3.240.0030.03812.86
5.3.230.0030.04312.80
5.3.220.0070.04112.88
5.3.210.0030.04112.84
5.3.200.0100.02312.87
5.3.190.0030.03812.90
5.3.180.0020.04212.90
5.3.170.0110.04012.83
5.3.160.0050.03812.87
5.3.150.0050.04012.81
5.3.140.0030.04212.80
5.3.130.0070.04012.81
5.3.120.0020.04212.78
5.3.110.0070.04312.77
5.3.100.0030.02112.61
5.3.90.0050.02912.63
5.3.80.0050.03512.61
5.3.70.0060.03912.56
5.3.60.0030.03712.55
5.3.50.0070.03912.49
5.3.40.0050.03812.51
5.3.30.0060.03512.51
5.3.20.0030.04012.40
5.3.10.0070.03212.34
5.3.00.0070.03712.38
5.2.170.0050.02011.38
5.2.160.0050.03011.38
5.2.150.0060.03111.38
5.2.140.0050.03011.38
5.2.130.0070.01711.38
5.2.120.0000.03611.38
5.2.110.0020.03411.38
5.2.100.0060.02311.38
5.2.90.0050.03511.38
5.2.80.0000.04111.38
5.2.70.0020.03711.38
5.2.60.0070.03211.38
5.2.50.0050.03011.38
5.2.40.0070.03211.38
5.2.30.0050.03011.38
5.2.20.0080.03111.38
5.2.10.0030.02311.38
5.2.00.0060.02811.38
5.1.60.0020.02511.38
5.1.50.0030.03111.38
5.1.40.0050.02711.38
5.1.30.0050.02911.38
5.1.20.0070.02711.38
5.1.10.0030.03111.38
5.1.00.0060.02611.38
5.0.50.0020.02011.38
5.0.40.0010.02511.38
5.0.30.0050.03211.38
5.0.20.0030.01611.38
5.0.10.0030.01811.38
5.0.00.0050.02811.38
4.4.90.0020.01111.38
4.4.80.0000.01411.38
4.4.70.0030.01611.38
4.4.60.0000.02211.38
4.4.50.0000.01911.38
4.4.40.0020.02011.38
4.4.30.0010.02011.38
4.4.20.0000.02111.38
4.4.10.0040.01311.38
4.4.00.0000.03211.38
4.3.110.0030.01311.38
4.3.100.0020.01811.38
4.3.90.0050.01611.38
4.3.80.0030.02511.38
4.3.70.0050.01411.38
4.3.60.0020.01411.38
4.3.50.0020.02011.38
4.3.40.0040.02511.38
4.3.30.0000.02011.38
4.3.20.0020.01711.38
4.3.10.0020.01411.38
4.3.00.0000.01911.38

preferences:
42.95 ms | 400 KiB | 5 Q