3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isCorrect($string) { $string{strlen($string)-1}; } var_dump('()'{strlen($string)-1}); //assert(isCorrect('') === true); //assert(isCorrect('()') === true); //assert(isCorrect('{()}') === true); //assert(isCorrect('{()}{}') === true); //assert(isCorrect('(())') === true); //assert(isCorrect('{({({({()})})})}') === true); //assert(isCorrect('{(})') === false);

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.0100.00718.31
8.3.50.0110.01021.17
8.3.40.0150.00018.71
8.3.30.0110.00319.14
8.3.20.0070.00020.28
8.3.10.0000.00823.48
8.3.00.0040.00419.25
8.2.180.0140.00316.50
8.2.170.0070.00722.96
8.2.160.0100.00320.35
8.2.150.0030.00524.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0080.00022.18
8.2.110.0040.00422.06
8.2.100.0080.00417.63
8.2.90.0060.00318.97
8.2.80.0040.00417.97
8.2.70.0080.00317.50
8.2.60.0080.00017.80
8.2.50.0030.00518.07
8.2.40.0050.00319.95
8.2.30.0000.00717.88
8.2.20.0060.00317.43
8.2.10.0000.00817.89
8.2.00.0040.00417.54
8.1.280.0110.00425.92
8.1.270.0040.00423.96
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0090.00023.84
8.1.230.0130.00019.04
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.09
8.1.190.0040.00417.13
8.1.180.0040.00418.10
8.1.170.0000.00918.49
8.1.160.0000.00821.95
8.1.150.0050.00218.70
8.1.140.0050.00317.23
8.1.130.0040.00417.85
8.1.120.0030.00317.36
8.1.110.0000.00717.27
8.1.100.0000.00717.21
8.1.90.0040.00417.20
8.1.80.0030.00417.31
8.1.70.0000.00717.27
8.1.60.0090.00017.42
8.1.50.0060.00317.29
8.1.40.0000.00717.39
8.1.30.0040.00417.48
8.1.20.0000.00717.39
8.1.10.0000.00717.41
8.1.00.0040.00417.36
8.0.300.0000.00818.77
8.0.290.0000.00716.63
8.0.280.0030.00318.30
8.0.270.0070.00017.17
8.0.260.0000.00817.20
8.0.250.0000.00716.89
8.0.240.0040.00416.74
8.0.230.0070.00016.81
8.0.220.0070.00016.71
8.0.210.0000.00816.78
8.0.200.0050.00216.92
8.0.190.0040.00416.82
8.0.180.0000.00816.90
8.0.170.0050.00316.74
8.0.160.0000.00816.74
8.0.150.0070.00316.76
8.0.140.0030.00316.80
8.0.130.0000.00513.21
8.0.120.0000.00816.89
8.0.110.0000.00716.83
8.0.100.0070.00016.93
8.0.90.0070.00016.64
8.0.80.0030.01316.81
8.0.70.0050.00216.79
8.0.60.0080.00016.77
8.0.50.0000.00716.62
8.0.30.0080.01116.98
8.0.20.0110.00817.40
8.0.10.0040.00416.79
8.0.00.0110.00616.63
7.4.330.0000.00515.02
7.4.320.0040.00416.39
7.4.300.0000.00716.30
7.4.290.0000.00716.48
7.4.280.0000.00716.29
7.4.270.0040.00416.24
7.4.260.0030.00316.37
7.4.250.0040.00416.41
7.4.240.0030.00516.48
7.4.230.0070.00016.28
7.4.220.0140.00416.42
7.4.210.0030.01016.55
7.4.200.0030.00316.45
7.4.160.0160.00716.66
7.4.150.0110.00717.40
7.4.140.0110.01117.86
7.4.130.0100.00716.28
7.4.120.0080.00816.32
7.4.110.0100.00716.52
7.4.100.0070.01116.52
7.4.90.0060.01216.72
7.4.80.0120.00619.39
7.4.70.0140.00316.46
7.4.60.0110.00616.51
7.4.50.0030.00616.63
7.4.40.0070.01016.58
7.4.30.0000.01716.38
7.4.00.0070.00914.89
7.3.330.0000.00513.22
7.3.320.0030.00313.34
7.3.310.0070.00016.26
7.3.300.0030.00316.24
7.3.290.0070.01016.36
7.3.280.0080.01316.32
7.3.270.0140.00317.40
7.3.260.0060.01716.54
7.3.250.0160.00516.46
7.3.240.0110.00816.30
7.3.230.0090.01216.39
7.3.210.0060.00916.47
7.3.200.0160.00419.39
7.3.190.0150.00316.49
7.3.180.0060.01216.50
7.3.170.0100.00716.42
7.3.160.0110.00616.39
7.3.120.0130.00615.05
7.3.110.0000.01614.66
7.3.100.0040.01414.92
7.3.90.0000.01514.79
7.3.80.0090.00614.68
7.3.70.0070.01014.80
7.3.60.0070.01014.92
7.3.50.0060.00614.38
7.3.40.0040.01114.68
7.3.30.0060.00614.70
7.3.20.0040.00716.81
7.3.10.0060.00316.50
7.3.00.0070.00716.57
7.2.330.0030.01316.66
7.2.320.0180.00016.36
7.2.310.0100.00716.43
7.2.300.0100.01216.63
7.2.290.0140.01116.39
7.2.250.0120.00614.76
7.2.240.0080.00814.90
7.2.230.0040.01515.02
7.2.220.0070.01014.89
7.2.210.0090.00914.93
7.2.200.0030.01015.07
7.2.190.0100.01015.04
7.2.180.0060.01314.83
7.2.170.0060.01214.65
7.2.130.0030.00716.73
7.2.120.0090.00316.75
7.2.110.0000.01216.70
7.2.100.0080.00316.66
7.2.90.0070.00716.75
7.2.80.0160.00216.69
7.2.70.0030.01016.60
7.2.60.0070.00916.82
7.2.50.0060.00316.88
7.2.40.0000.01316.64
7.2.30.0060.00616.94
7.2.20.0050.00516.46
7.2.10.0040.00816.87
7.2.00.0080.00718.08
7.1.330.0030.01015.62
7.1.320.0000.01215.68
7.1.310.0060.00615.79
7.1.300.0100.00715.67
7.1.290.0110.00715.52
7.1.280.0070.00715.75
7.1.270.0060.00615.68
7.1.260.0030.00715.91
7.1.250.0150.00015.76
7.1.240.0090.00015.74
7.1.230.0000.01215.57
7.1.220.0070.00715.77
7.1.210.0000.01115.81
7.1.200.0040.00715.70
7.1.190.0030.00915.49
7.1.180.0030.00315.51
7.1.170.0000.00815.59
7.1.160.0120.00015.78
7.1.150.0070.00315.95
7.1.140.0030.00815.57
7.1.130.0090.00615.70
7.1.120.0070.00315.56
7.1.110.0110.00015.65
7.1.100.0020.01116.79
7.1.90.0070.00315.95
7.1.80.0000.01015.75
7.1.70.0140.00416.05
7.1.60.0080.00917.36
7.1.50.0060.01116.15
7.1.40.0030.01215.91
7.1.30.0040.00715.66
7.1.20.0110.00015.96
7.1.10.0030.01015.79
7.1.00.0060.03919.01
7.0.330.0040.00815.15
7.0.320.0030.00915.39
7.0.310.0060.00315.29
7.0.300.0070.00315.39
7.0.290.0040.00415.54
7.0.280.0030.00715.13
7.0.270.0030.01115.32
7.0.260.0040.00415.50
7.0.250.0060.00615.41
7.0.240.0000.01415.55
7.0.230.0070.00715.19
7.0.220.0070.00015.23
7.0.210.0080.00815.27
7.0.200.0030.00815.88
7.0.190.0030.00715.22
7.0.180.0090.00615.11
7.0.170.0000.01215.25
7.0.160.0000.01215.52
7.0.150.0060.00615.47
7.0.140.0000.04418.64
7.0.130.0100.00315.54
7.0.120.0070.01015.36
7.0.110.0080.00815.40
7.0.100.0090.00315.16
7.0.90.0080.00415.51
7.0.80.0030.00915.37
7.0.70.0040.00815.45
7.0.60.0050.04517.75
7.0.50.0030.03316.54
7.0.40.0080.04316.84
7.0.30.0150.04316.91
7.0.20.0200.04016.73
7.0.10.0050.04016.72
7.0.00.0040.02516.61
5.6.380.0080.00314.14
5.6.370.0030.00614.41
5.6.360.0060.00314.14
5.6.350.0060.00614.39
5.6.340.0030.00713.95
5.6.330.0080.00314.25
5.6.320.0000.01014.25
5.6.310.0030.00714.30
5.6.300.0040.01114.16
5.6.290.0110.00614.00
5.6.280.0050.03917.71
5.6.270.0060.00614.28
5.6.260.0090.00014.24
5.6.250.0090.00014.15
5.6.240.0000.01514.14
5.6.230.0110.00013.95
5.6.220.0060.00614.08
5.6.210.0050.04117.31
5.6.200.0090.04516.11
5.6.190.0020.02817.38
5.6.180.0180.03317.32
5.6.170.0140.03417.31
5.6.160.0020.05417.15
5.6.150.0080.04216.21
5.6.140.0110.04016.08
5.6.130.0100.04416.18
5.6.120.0040.02317.46
5.6.110.0020.02417.69
5.6.100.0140.01717.53
5.6.90.0140.03317.52
5.6.80.0080.04017.28
5.6.70.0060.00914.00
5.6.60.0000.01114.07
5.6.50.0060.00914.03
5.6.40.0040.01113.82
5.6.30.0080.00013.91
5.6.20.0040.00413.84
5.6.10.0090.00313.93
5.6.00.0070.00314.04
5.5.380.0070.00010.78
5.5.370.0040.00810.53
5.5.360.0030.00311.15
5.5.350.0080.04015.68
5.5.340.0110.03614.51
5.5.330.0080.04115.55
5.5.320.0040.03915.53
5.5.310.0100.02115.60
5.5.300.0050.04414.52
5.5.290.0050.04514.56
5.5.280.0070.04415.78
5.5.270.0070.04315.83
5.5.260.0070.03815.84
5.5.250.0050.04015.69
5.5.240.0050.01515.40
5.5.230.0030.00610.91
5.5.220.0000.00810.92
5.5.210.0040.00410.66
5.5.200.0060.00610.75
5.5.190.0080.00310.78
5.5.180.0030.00911.02
5.5.170.0000.00810.96
5.5.160.0060.00311.00
5.5.150.0040.00710.94
5.5.140.0060.00310.89
5.5.130.0060.00010.64
5.5.120.0030.00510.86
5.5.110.0060.00310.98
5.5.100.0040.00410.78
5.5.90.0060.00310.77
5.5.80.0060.00011.07
5.5.70.0040.00710.99
5.5.60.0040.00410.99
5.5.50.0000.01010.96
5.5.40.0000.00910.96
5.5.30.0040.00410.70
5.5.20.0050.00210.77
5.5.10.0050.00310.96
5.5.00.0060.00310.84
5.4.450.0370.03715.31
5.4.440.0380.03315.04
5.4.430.0360.03015.00
5.4.420.0360.00015.20
5.4.410.0450.00215.21
5.4.400.0320.00514.85
5.4.390.0340.00015.04
5.4.380.0330.00315.05
5.4.370.0450.00414.81
5.4.360.0320.00614.81
5.4.350.0320.00314.84
5.4.340.0060.01611.41
5.4.330.0040.00410.67
5.4.320.0040.02211.77
5.4.310.0060.02511.67
5.4.300.0060.02211.62
5.4.290.0040.02111.63
5.4.280.0030.03011.66
5.4.270.0070.02011.64
5.4.260.0050.02611.64
5.4.250.0020.02511.54
5.4.240.0040.02311.53
5.4.230.0090.02511.58
5.4.220.0070.02411.45
5.4.210.0030.02111.50
5.4.200.0060.02111.47
5.4.190.0040.02711.54
5.4.180.0050.02111.70
5.4.170.0040.02211.34
5.4.160.0060.01911.52
5.4.150.0050.02011.60
5.4.140.0030.02311.48
5.4.130.0040.02111.29
5.4.120.0050.02111.27
5.4.110.0060.02011.28
5.4.100.0040.02511.42
5.4.90.0080.02111.42
5.4.80.0080.02211.49
5.4.70.0060.01911.38
5.4.60.0040.02011.32
5.4.50.0050.01911.41
5.4.40.0080.01911.37
5.4.30.0030.02311.47
5.4.20.0080.01811.45
5.4.10.0050.02011.44
5.4.00.0060.02111.08
5.3.290.0060.02511.65
5.3.280.0050.02011.49
5.3.270.0060.02111.38
5.3.260.0030.02411.51
5.3.250.0050.02211.39
5.3.240.0030.02111.47
5.3.230.0060.01911.48
5.3.220.0060.02111.44
5.3.210.0020.02411.46
5.3.200.0040.02511.32
5.3.190.0040.02211.33
5.3.180.0020.02311.55
5.3.170.0040.02111.44
5.3.160.0090.01811.55
5.3.150.0040.02311.57
5.3.140.0050.02011.48
5.3.130.0060.02611.48
5.3.120.0040.02611.51
5.3.110.0040.02411.48
5.3.100.0030.02211.27
5.3.90.0050.01911.28
5.3.80.0070.01911.08
5.3.70.0050.01811.22
5.3.60.0050.01911.20
5.3.50.0080.02111.05
5.3.40.0070.02210.99
5.3.30.0060.01911.04
5.3.20.0040.02111.00
5.3.10.0070.01610.90
5.3.00.0040.02210.90
5.2.170.0040.0199.59
5.2.160.0060.0189.59
5.2.150.0020.0219.59
5.2.140.0040.0189.59
5.2.130.0040.0179.56
5.2.120.0050.0159.56
5.2.110.0050.0159.57
5.2.100.0060.0139.57
5.2.90.0050.0179.57
5.2.80.0020.0199.56
5.2.70.0020.0229.56
5.2.60.0060.0149.54
5.2.50.0040.0199.53
5.2.40.0060.0139.51
5.2.30.0040.0189.50
5.2.20.0060.0169.50
5.2.10.0050.0149.45
5.2.00.0020.0189.38
5.1.60.0030.0159.02
5.1.50.0040.0169.02
5.1.40.0050.0149.01
5.1.30.0040.0189.19
5.1.20.0040.0159.20
5.1.10.0020.0179.06
5.1.00.0060.0129.06
5.0.50.0050.0098.30
5.0.40.0050.0108.23
5.0.30.0040.0188.13
5.0.20.0060.0098.12
5.0.10.0060.0098.11
5.0.00.0030.0188.10
4.4.90.0020.0117.37
4.4.80.0030.0097.36
4.4.70.0020.0097.36
4.4.60.0030.0077.35
4.4.50.0030.0097.36
4.4.40.0010.0177.33
4.4.30.0020.0117.36
4.4.20.0040.0077.40
4.4.10.0020.0117.40
4.4.00.0020.0137.36
4.3.110.0010.0127.31
4.3.100.0020.0107.31
4.3.90.0030.0097.29
4.3.80.0040.0137.27
4.3.70.0020.0107.29
4.3.60.0030.0077.29
4.3.50.0020.0117.29
4.3.40.0050.0127.25
4.3.30.0000.0116.63
4.3.20.0030.0096.62
4.3.10.0020.0096.60
4.3.00.0100.0128.29

preferences:
54.38 ms | 401 KiB | 5 Q