3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isCorrect($string) { if (strlen($string) % 2) { for( $i = 0; $i < strlen($string); $i++) { $string; } } return false; } $string = '({{}})'; var_dump(isCorrect($string)); //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.40.0070.00718.84
8.3.30.0120.00319.04
8.3.20.0070.00020.05
8.3.10.0000.00823.48
8.3.00.0000.00819.26
8.2.170.0120.00322.96
8.2.160.0110.00320.26
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0000.00722.11
8.2.110.0050.00521.93
8.2.100.0090.00317.75
8.2.90.0040.00419.09
8.2.80.0050.00317.97
8.2.70.0080.00517.00
8.2.60.0040.00417.90
8.2.50.0040.00418.07
8.2.40.0050.00320.00
8.2.30.0000.00717.94
8.2.20.0040.00417.74
8.2.10.0000.00818.05
8.2.00.0040.00417.78
8.1.270.0000.00823.83
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00023.91
8.1.230.0080.00419.02
8.1.220.0070.00017.74
8.1.210.0060.00318.77
8.1.200.0060.00317.23
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0050.00318.52
8.1.160.0040.00421.95
8.1.150.0000.00718.88
8.1.140.0040.00417.42
8.1.130.0030.00317.74
8.1.120.0040.00417.36
8.1.110.0000.00817.38
8.1.100.0000.00717.42
8.1.90.0000.00717.32
8.1.80.0000.00717.33
8.1.70.0070.00017.34
8.1.60.0080.00017.61
8.1.50.0030.00517.55
8.1.40.0000.00817.45
8.1.30.0080.00017.55
8.1.20.0030.00617.66
8.1.10.0040.00417.48
8.1.00.0040.00417.48
8.0.300.0040.00418.77
8.0.290.0030.00316.63
8.0.280.0040.00418.44
8.0.270.0000.00717.25
8.0.260.0000.00617.16
8.0.250.0000.00716.84
8.0.240.0000.00816.84
8.0.230.0100.00016.93
8.0.220.0040.00416.84
8.0.210.0000.00716.80
8.0.200.0030.00316.84
8.0.190.0040.00416.91
8.0.180.0040.00416.93
8.0.170.0040.00416.88
8.0.160.0080.00016.87
8.0.150.0000.00716.90
8.0.140.0050.00216.86
8.0.130.0030.00313.35
8.0.120.0000.00816.70
8.0.110.0050.00216.77
8.0.100.0000.00716.87
8.0.90.0030.00516.95
8.0.80.0080.00816.87
8.0.70.0070.00016.84
8.0.60.0040.00416.71
8.0.50.0050.00316.84
8.0.30.0120.00817.12
8.0.20.0110.00817.40
8.0.10.0040.00417.00
8.0.00.0100.00816.57
7.4.330.0060.00015.02
7.4.320.0060.00016.42
7.4.300.0060.00016.50
7.4.290.0030.00316.59
7.4.280.0000.01016.56
7.4.270.0070.00016.43
7.4.260.0070.00016.57
7.4.250.0040.00416.37
7.4.240.0040.00416.47
7.4.230.0030.00316.55
7.4.220.0070.01316.54
7.4.210.0040.01216.59
7.4.200.0030.00316.59
7.4.160.0150.00016.34
7.4.150.0120.00917.40
7.4.140.0130.00817.86
7.4.130.0110.00516.39
7.4.120.0090.00816.43
7.4.110.0070.01016.32
7.4.100.0070.01016.58
7.4.90.0070.01016.54
7.4.80.0100.00719.39
7.4.70.0040.01416.39
7.4.60.0120.00616.35
7.4.50.0000.00816.38
7.4.40.0080.00916.68
7.4.30.0130.00316.69
7.4.00.0030.01415.01
7.3.330.0000.00613.30
7.3.320.0000.00613.25
7.3.310.0040.00416.36
7.3.300.0050.00216.35
7.3.290.0070.00916.31
7.3.280.0070.01116.28
7.3.270.0090.01317.40
7.3.260.0120.00616.57
7.3.250.0090.01016.39
7.3.240.0140.00316.43
7.3.230.0100.00716.55
7.3.210.0100.00716.54
7.3.200.0100.00719.39
7.3.190.0130.00416.43
7.3.180.0030.01316.31
7.3.170.0040.01716.38
7.3.160.0090.01216.34
7.3.00.0000.01116.67
7.2.330.0100.00716.59
7.2.320.0100.00716.55
7.2.310.0100.00716.63
7.2.300.0070.01016.46
7.2.290.0060.01216.55
7.2.130.0060.00616.70
7.2.120.0070.00716.69
7.2.110.0110.00716.76
7.2.100.0070.00716.53
7.2.90.0040.00816.50
7.2.80.0070.00716.59
7.2.70.0070.00716.57
7.2.60.0090.00516.70
7.2.50.0030.01416.75
7.2.40.0060.00616.73
7.2.30.0100.01016.70
7.2.20.0080.00316.84
7.2.10.0000.01216.66
7.2.00.0010.01117.73
7.1.250.0000.00815.59
7.1.240.0030.01015.76
7.1.230.0030.01015.43
7.1.220.0000.00915.75
7.1.210.0060.00915.59
7.1.200.0080.00515.61
7.1.190.0100.00615.55
7.1.180.0070.00415.34
7.1.170.0050.00515.34
7.1.160.0060.00615.47
7.1.150.0030.01115.81
7.1.140.0080.00015.86
7.1.130.0060.00615.61
7.1.120.0030.01215.73
7.1.110.0070.00715.75
7.1.100.0020.01116.82
7.1.90.0100.00315.84
7.1.80.0130.00315.64
7.1.70.0030.00716.42
7.1.60.0040.01617.43
7.1.50.0090.01016.08
7.1.40.0030.01215.61
7.1.30.0000.01115.44
7.1.20.0030.01015.74
7.1.10.0030.00615.69
7.1.00.0030.04219.15
7.0.330.0050.00515.25
7.0.320.0030.00715.40
7.0.310.0060.00615.03
7.0.300.0040.00815.28
7.0.290.0060.00315.48
7.0.280.0110.00015.28
7.0.270.0030.00915.45
7.0.260.0040.01115.54
7.0.250.0060.00615.32
7.0.240.0040.00415.61
7.0.230.0090.00615.38
7.0.220.0000.01315.30
7.0.210.0030.00615.39
7.0.200.0040.00516.09
7.0.190.0070.00415.36
7.0.180.0000.00915.32
7.0.170.0000.00915.22
7.0.160.0000.01115.36
7.0.150.0030.01015.29
7.0.140.0020.04018.61
7.0.130.0120.00015.39
7.0.120.0040.00715.42
7.0.110.0070.00715.36
7.0.100.0030.01015.41
7.0.90.0060.00315.24
7.0.80.0030.00715.21
7.0.70.0060.00615.27
7.0.60.0080.04617.57
7.0.50.0090.02716.52
7.0.40.0100.03516.55
7.0.30.0180.03016.72
7.0.20.0130.02016.71
7.0.10.0070.02516.75
7.0.00.0100.04416.79
5.6.380.0060.00914.23
5.6.370.0130.00314.20
5.6.360.0060.00313.86
5.6.350.0070.00714.20
5.6.340.0000.01414.20
5.6.330.0090.00314.17
5.6.320.0070.00714.23
5.6.310.0040.00714.29
5.6.300.0120.00013.93
5.6.290.0060.00914.20
5.6.280.0030.04117.69
5.6.270.0070.00414.30
5.6.260.0040.01114.07
5.6.250.0070.00414.48
5.6.240.0030.01013.94
5.6.230.0060.00313.97
5.6.220.0070.00314.03
5.6.210.0030.04617.36
5.6.200.0120.03716.21
5.6.190.0020.02817.23
5.6.180.0150.03017.35
5.6.170.0140.02217.22
5.6.160.0030.02717.25
5.6.150.0050.04416.14
5.6.140.0080.04116.21
5.6.130.0030.04616.19
5.6.120.0070.04417.58
5.6.110.0080.03817.55
5.6.100.0070.04217.71
5.6.90.0060.03017.53
5.6.80.0070.03817.04
5.6.70.2150.02017.32
5.6.60.0030.01013.96
5.6.50.0030.01014.11
5.6.40.0080.00314.20
5.6.30.0030.01014.00
5.6.20.0060.00614.16
5.6.10.0110.00014.18
5.6.00.0060.00614.08
5.5.380.0030.00311.00
5.5.370.0000.00811.00
5.5.360.0000.01011.00
5.5.350.0130.02815.72
5.5.340.0110.03014.51
5.5.330.0040.03315.61
5.5.320.0150.04215.71
5.5.310.0140.02715.67
5.5.300.0030.02414.62
5.5.290.0060.04014.50
5.5.280.0050.04815.89
5.5.270.0100.04615.84
5.5.260.0080.04315.90
5.5.250.0080.03715.85
5.5.240.0150.03415.63
5.5.230.0080.00011.00
5.5.220.0000.00511.08
5.5.210.0060.00611.00
5.5.200.0040.00411.06
5.5.190.0040.00411.00
5.5.180.0000.01211.12
5.5.170.0030.00911.11
5.5.160.0060.00311.21
5.5.150.0030.00311.00
5.5.140.0030.00911.09
5.5.130.0040.00411.00
5.5.120.0040.00411.28
5.5.110.0060.00011.00
5.5.100.0040.00811.00
5.5.90.0030.00811.00
5.5.80.0030.00711.00
5.5.70.0000.01011.09
5.5.60.0030.00311.00
5.5.50.0050.00511.00
5.5.40.0030.00711.00
5.5.30.0000.01011.00
5.5.20.0000.01011.14
5.5.10.0000.00811.05
5.5.00.0040.00811.10
5.4.450.0090.02815.31
5.4.440.0380.03815.22
5.4.430.0180.03115.19
5.4.420.0370.00115.24
5.4.410.0370.00115.20
5.4.400.0370.00015.15
5.4.390.0350.00415.09
5.4.380.0350.00315.06
5.4.370.0340.00215.05
5.4.360.0350.00315.12
5.4.350.0430.00215.05
5.4.340.0090.01611.51
5.4.330.0000.00611.00
5.4.320.0070.02211.76
5.4.310.0060.02011.75
5.4.300.0030.02111.79
5.4.290.0060.02311.75
5.4.280.0040.02111.70
5.4.270.0070.02311.70
5.4.260.0050.02111.70
5.4.250.0050.02111.70
5.4.240.0040.02111.71
5.4.230.0080.02011.70
5.4.220.0050.02111.70
5.4.210.0030.02011.70
5.4.200.0070.02211.70
5.4.190.0070.02011.70
5.4.180.0020.02411.70
5.4.170.0050.02011.70
5.4.160.0030.02611.70
5.4.150.0070.01911.70
5.4.140.0050.02011.54
5.4.130.0040.02011.53
5.4.120.0090.01811.51
5.4.110.0120.01911.51
5.4.100.0070.01711.51
5.4.90.0040.02211.51
5.4.80.0060.02211.51
5.4.70.0040.02011.51
5.4.60.0090.01811.51
5.4.50.0020.02311.51
5.4.40.0040.02611.50
5.4.30.0020.02511.50
5.4.20.0040.01911.50
5.4.10.0080.02011.50
5.4.00.0080.01911.28
5.3.290.0080.02211.90
5.3.280.0030.02411.86
5.3.270.0050.02011.86
5.3.260.0030.02511.86
5.3.250.0040.02111.86
5.3.240.0030.02811.86
5.3.230.0040.02311.86
5.3.220.0060.02011.84
5.3.210.0060.02211.84
5.3.200.0050.02111.84
5.3.190.0050.02011.84
5.3.180.0040.02011.84
5.3.170.0050.02211.84
5.3.160.0050.02011.84
5.3.150.0060.02311.84
5.3.140.0090.01711.83
5.3.130.0060.02411.83
5.3.120.0060.02211.83
5.3.110.0050.02111.83
5.3.100.0040.02311.56
5.3.90.0040.02011.55
5.3.80.0040.02611.55
5.3.70.0040.02611.54
5.3.60.0020.02211.54
5.3.50.0040.02411.51
5.3.40.0030.02311.51
5.3.30.0020.02211.49
5.3.20.0070.01911.38
5.3.10.0020.02211.37
5.3.00.0050.02011.36
5.2.170.0040.01910.11
5.2.160.0020.01810.11
5.2.150.0050.01510.11
5.2.140.0040.02010.11
5.2.130.0020.02010.08
5.2.120.0030.01910.09
5.2.110.0050.01410.09
5.2.100.0050.01610.09
5.2.90.0050.01510.09
5.2.80.0050.01710.09
5.2.70.0020.01810.09
5.2.60.0050.01510.06
5.2.50.0050.01510.05
5.2.40.0050.01510.04
5.2.30.0040.01810.02
5.2.20.0020.01710.02
5.2.10.0040.0239.97
5.2.00.0040.0179.90
5.1.60.0040.0129.54
5.1.50.0040.0139.54
5.1.40.0030.0139.53
5.1.30.0050.0159.71
5.1.20.0060.0139.72
5.1.10.0020.0189.58
5.1.00.0060.0159.58
5.0.50.0030.0138.82
5.0.40.0040.0118.75
5.0.30.0010.0198.65
5.0.20.0050.0098.64
5.0.10.0050.0098.63
5.0.00.0030.0168.63
4.4.90.0010.0137.89
4.4.80.0020.0117.88
4.4.70.0040.0097.88
4.4.60.0050.0077.88
4.4.50.0020.0097.89
4.4.40.0050.0137.86
4.4.30.0040.0117.88
4.4.20.0040.0097.92
4.4.10.0030.0107.93
4.4.00.0030.0197.88
4.3.110.0020.0097.84
4.3.100.0020.0097.83
4.3.90.0030.0087.82
4.3.80.0010.0167.79
4.3.70.0020.0087.82
4.3.60.0030.0097.81
4.3.50.0040.0077.82
4.3.40.0050.0157.77
4.3.30.0020.0127.15
4.3.20.0020.0117.14
4.3.10.0010.0137.12
4.3.00.0030.0158.82

preferences:
55.27 ms | 400 KiB | 5 Q