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 true; } return false; } $string = '({{}})'; //var_dump(isCorrect($string)); var_dump(strlen($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.01018.72
8.3.30.0130.00318.79
8.3.20.0000.00720.21
8.3.10.0000.00723.47
8.3.00.0040.00419.26
8.2.170.0060.00922.96
8.2.160.0040.01120.41
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0070.00022.04
8.2.110.0030.00620.55
8.2.100.0110.00017.91
8.2.90.0000.00819.23
8.2.80.0080.00017.97
8.2.70.0080.00017.50
8.2.60.0030.00517.92
8.2.50.0030.00518.07
8.2.40.0060.00319.83
8.2.30.0000.00717.99
8.2.20.0030.00517.62
8.2.10.0040.00417.93
8.2.00.0040.00417.57
8.1.270.0060.00323.91
8.1.260.0070.00026.35
8.1.250.0060.00328.09
8.1.240.0000.00923.96
8.1.230.0040.00719.02
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0030.00616.98
8.1.190.0030.00617.23
8.1.180.0030.00618.10
8.1.170.0050.00318.59
8.1.160.0050.00321.95
8.1.150.0000.00818.73
8.1.140.0040.00417.30
8.1.130.0030.00317.69
8.1.120.0030.00317.44
8.1.110.0040.00417.33
8.1.100.0030.00317.35
8.1.90.0040.00417.39
8.1.80.0030.00317.43
8.1.70.0000.00717.35
8.1.60.0050.00517.51
8.1.50.0030.00617.35
8.1.40.0040.00417.43
8.1.30.0040.00417.48
8.1.20.0050.00217.51
8.1.10.0040.00417.55
8.1.00.0000.00817.43
8.0.300.0040.00420.12
8.0.290.0030.00716.60
8.0.280.0070.00018.36
8.0.270.0000.00717.18
8.0.260.0000.00617.18
8.0.250.0030.00316.76
8.0.240.0040.00416.87
8.0.230.0060.00316.86
8.0.220.0040.00416.78
8.0.210.0000.00716.82
8.0.200.0000.00716.83
8.0.190.0050.00216.89
8.0.180.0000.00716.85
8.0.170.0040.00416.73
8.0.160.0040.00416.87
8.0.150.0080.00016.77
8.0.140.0040.00416.70
8.0.130.0000.00513.30
8.0.120.0000.00916.81
8.0.110.0030.00516.81
8.0.100.0000.00716.62
8.0.90.0030.00516.77
8.0.80.0100.00716.77
8.0.70.0040.00416.73
8.0.60.0070.00016.66
8.0.50.0030.00516.73
8.0.30.0080.01617.02
8.0.20.0140.00917.40
8.0.10.0040.00416.91
8.0.00.0130.00716.69
7.4.330.0000.00515.02
7.4.320.0030.00316.41
7.4.300.0040.00416.40
7.4.290.0000.00716.53
7.4.280.0000.01116.32
7.4.270.0000.00716.45
7.4.260.0000.00716.55
7.4.250.0030.00516.41
7.4.240.0070.00016.55
7.4.230.0070.00016.50
7.4.220.0120.00616.47
7.4.210.0090.00616.39
7.4.200.0030.00316.55
7.4.160.0100.00616.61
7.4.150.0070.01117.40
7.4.140.0110.01017.86
7.4.130.0110.00516.39
7.4.120.0080.01216.29
7.4.110.0100.00616.36
7.4.100.0130.00316.48
7.4.90.0100.00716.49
7.4.80.0060.01219.39
7.4.70.0110.01116.35
7.4.60.0130.00516.51
7.4.50.0000.00916.39
7.4.40.0050.01116.39
7.4.30.0040.01116.50
7.4.00.0040.01314.92
7.3.330.0050.00013.20
7.3.320.0000.00513.10
7.3.310.0000.00716.18
7.3.300.0000.00716.27
7.3.290.0070.00816.22
7.3.280.0110.01016.21
7.3.270.0100.00717.40
7.3.260.0170.00016.29
7.3.250.0070.01216.29
7.3.240.0070.01016.44
7.3.230.0120.00916.39
7.3.210.0080.00816.26
7.3.200.0150.00419.39
7.3.190.0080.00816.32
7.3.180.0030.01616.34
7.3.170.0100.01016.27
7.3.160.0090.00616.41
7.3.120.0070.01114.97
7.3.110.0040.01514.89
7.3.100.0130.00714.58
7.3.90.0040.01114.98
7.3.80.0030.01014.91
7.3.70.0080.00414.79
7.3.60.0140.00014.42
7.3.50.0120.00314.66
7.3.40.0000.01414.79
7.3.30.0060.00614.83
7.3.20.0000.01516.71
7.3.10.0060.01016.62
7.3.00.0100.00616.22
7.2.330.0140.00316.44
7.2.320.0250.03116.46
7.2.310.0170.00016.28
7.2.300.0230.02316.39
7.2.290.0120.00816.54
7.2.250.0000.02014.60
7.2.240.0030.01314.86
7.2.230.0060.00914.82
7.2.220.0140.00414.89
7.2.210.0000.01314.93
7.2.200.0070.00715.00
7.2.190.0070.00714.98
7.2.180.0110.00614.68
7.2.170.0000.01414.98
7.2.160.0100.00614.70
7.2.150.0040.00816.80
7.2.140.0030.01016.91
7.2.130.0080.00816.71
7.2.120.0000.01316.62
7.2.110.0060.00916.75
7.2.100.0040.00916.42
7.2.90.0070.00716.85
7.2.80.0030.01016.64
7.2.70.0050.00516.90
7.2.60.0030.01016.74
7.2.50.0130.00316.84
7.2.40.0060.00316.83
7.2.30.0070.00716.77
7.2.20.0100.01016.89
7.2.10.0100.01016.74
7.2.00.0120.01017.92
7.1.330.0090.00615.52
7.1.320.0070.00715.63
7.1.310.0000.01415.45
7.1.300.0070.00315.71
7.1.290.0030.00615.75
7.1.280.0040.00815.68
7.1.270.0000.01415.73
7.1.260.0060.00315.76
7.1.250.0060.00315.71
7.1.240.0060.00615.67
7.1.230.0030.00915.56
7.1.220.0030.01015.54
7.1.210.0040.00415.50
7.1.200.0020.01115.78
7.1.190.0030.01015.75
7.1.180.0030.00615.78
7.1.170.0030.00615.49
7.1.160.0120.00015.73
7.1.150.0030.00615.64
7.1.140.0070.00715.84
7.1.130.0080.00015.70
7.1.120.0000.01715.79
7.1.110.0030.01415.92
7.1.100.0080.00216.94
7.1.90.0070.00715.66
7.1.80.0000.01115.54
7.1.70.0080.00716.52
7.1.60.0050.01317.42
7.1.50.0060.01316.27
7.1.40.0060.00615.70
7.1.30.0070.00715.65
7.1.20.0030.00915.40
7.1.10.0000.01415.67
7.1.00.0060.04119.00
7.0.330.0000.01614.99
7.0.320.0120.00315.26
7.0.310.0070.00715.32
7.0.300.0050.00515.08
7.0.290.0080.00315.37
7.0.280.0040.01215.41
7.0.270.0090.00615.20
7.0.260.0030.01315.23
7.0.250.0090.00915.23
7.0.240.0040.00715.16
7.0.230.0060.00615.31
7.0.220.0110.00315.37
7.0.210.0030.00515.06
7.0.200.0050.00516.03
7.0.190.0050.00515.21
7.0.180.0030.00615.01
7.0.170.0100.00315.43
7.0.160.0040.00415.17
7.0.150.0050.00315.40
7.0.140.0030.04318.70
7.0.130.0070.00715.49
7.0.120.0000.00915.23
7.0.110.0300.04217.73
7.0.100.0330.04317.72
7.0.90.0330.03817.63
7.0.80.0200.04017.61
7.0.70.0180.02717.60
7.0.60.0240.04017.79
7.0.50.0300.03717.75
7.0.40.0060.03416.75
7.0.30.0100.04016.84
7.0.20.0050.04516.71
7.0.10.0030.05016.86
7.0.00.0040.04716.69
5.6.400.0030.00614.17
5.6.390.0090.00614.32
5.6.380.0110.00413.99
5.6.370.0000.01214.11
5.6.360.0000.01513.95
5.6.350.0030.00914.17
5.6.340.0040.01214.15
5.6.330.0080.00814.11
5.6.320.0040.01214.43
5.6.310.0040.00714.33
5.6.300.0060.00614.03
5.6.290.0040.00414.16
5.6.280.0060.03717.61
5.6.270.0040.00714.46
5.6.260.0110.03717.31
5.6.250.0070.04417.46
5.6.240.0030.04417.55
5.6.230.0060.04317.50
5.6.220.0110.03617.34
5.6.210.0100.03717.43
5.6.200.0080.04317.59
5.6.190.0050.02517.71
5.6.180.0130.04217.59
5.6.170.0100.04317.74
5.6.160.0080.02517.60
5.6.150.0070.04617.61
5.6.140.0030.02617.64
5.6.130.0050.02617.50
5.6.120.0070.02717.75
5.6.110.0070.02117.64
5.6.100.0050.02317.72
5.6.90.0080.02017.70
5.6.80.0070.02217.21
5.6.70.0050.02717.37
5.6.60.0090.04017.28
5.6.50.0020.03717.38
5.6.40.0060.02917.29
5.6.30.0030.02717.17
5.6.20.0050.02217.32
5.6.10.0060.02317.38
5.6.00.0040.02717.29
5.5.380.0080.03817.32
5.5.370.0070.02217.36
5.5.360.0100.03817.18
5.5.350.0040.04217.23
5.5.340.0080.04417.26
5.5.330.0040.03817.55
5.5.320.0130.03817.57
5.5.310.0120.04217.51
5.5.300.0040.03017.61
5.5.290.0060.02517.31
5.5.280.0080.03117.50
5.5.270.0080.02017.58
5.5.260.0060.02517.45
5.5.250.0050.02617.25
5.5.240.0100.03817.35
5.5.230.0030.04117.04
5.5.220.0070.02517.11
5.5.210.0060.02017.16
5.5.200.0000.04517.19
5.5.190.0070.02217.19
5.5.180.0050.02217.14
5.5.170.0090.00914.05
5.5.160.0000.02816.99
5.5.150.0050.02817.14
5.5.140.0020.02417.13
5.5.130.0080.02117.18
5.5.120.0060.02317.23
5.5.110.0040.02517.17
5.5.100.0070.02017.03
5.5.90.0070.02217.01
5.5.80.0030.02317.13
5.5.70.0040.02317.12
5.5.60.0070.01916.98
5.5.50.0070.03917.11
5.5.40.0050.02317.10
5.5.30.0070.03017.04
5.5.20.0030.02616.94
5.5.10.0060.02316.93
5.5.00.0020.03416.98
5.4.450.0050.04115.17
5.4.440.0030.02315.20
5.4.430.0080.02215.22
5.4.420.0050.02215.34
5.4.410.0050.01815.14
5.4.400.0070.01814.88
5.4.390.0060.01715.02
5.4.380.0040.02014.83
5.4.370.0030.02014.89
5.4.360.0070.01915.07
5.4.350.0070.02315.06
5.4.340.0030.02315.07
5.4.330.0030.00710.83
5.4.320.0030.02215.02
5.4.310.0050.01815.00
5.4.300.0050.02314.89
5.4.290.0000.02314.95
5.4.280.0040.02314.95
5.4.270.0030.02714.80
5.4.260.0060.02015.02
5.4.250.0030.02114.82
5.4.240.0060.01815.03
5.4.230.0030.02214.88
5.4.220.0050.02215.06
5.4.210.0030.02115.08
5.4.200.0000.02714.97
5.4.190.0020.02815.02
5.4.180.0030.02015.08
5.4.170.0040.02214.86
5.4.160.0050.02015.08
5.4.150.0070.01914.99
5.4.140.0100.03813.70
5.4.130.0050.02813.69
5.4.120.0030.04213.65
5.4.110.0050.04013.67
5.4.100.0120.03313.72
5.4.90.0080.03613.75
5.4.80.0090.03213.71
5.4.70.0070.03513.63
5.4.60.0030.03413.61
5.4.50.0060.03413.67
5.4.40.0050.03713.76
5.4.30.0070.03613.77
5.4.20.0100.03113.73
5.4.10.0060.02113.73
5.4.00.0080.03813.39
5.3.290.0000.04014.79
5.3.280.0100.03014.57
5.3.270.0170.05714.64
5.3.260.0000.06014.71
5.3.250.0000.04014.61
5.3.240.0000.08014.69
5.3.230.0130.07714.57
5.3.220.0070.07314.57
5.3.210.0100.06714.71
5.3.200.0070.07014.70
5.3.190.0130.06714.69
5.3.180.0070.07014.57
5.3.170.0100.07014.52
5.3.160.0070.07714.57
5.3.150.0100.06314.70
5.3.140.0100.06714.66
5.3.130.0100.07314.64
5.3.120.0030.07714.56
5.3.110.0100.06714.59
5.3.100.0030.07714.17
5.3.90.0100.06714.03
5.3.80.0100.06713.99
5.3.70.0000.06714.10
5.3.60.0070.05714.23
5.3.50.0070.07713.80
5.3.40.0030.04713.80
5.3.30.0000.05713.91
5.3.20.0030.04713.91
5.3.10.0170.06013.51
5.3.00.0170.05713.71
5.2.170.0070.06012.33
5.2.160.0070.03712.33
5.2.150.0100.06012.33
5.2.140.0070.05712.33
5.2.130.0030.06012.33
5.2.120.0070.05312.33
5.2.110.0070.05312.33
5.2.100.0030.06012.33
5.2.90.0170.04712.33
5.2.80.0030.06712.33
5.2.70.0070.05712.33
5.2.60.0030.05712.33
5.2.50.0100.06312.33
5.2.40.0070.05012.33
5.2.30.0030.05312.33
5.2.20.0070.05312.33
5.2.10.0000.06312.33
5.2.00.0030.06012.33
5.1.60.0070.05312.33
5.1.50.0030.03012.33
5.1.40.0030.04012.33
5.1.30.0070.05312.33
5.1.20.0100.03712.33
5.1.10.0070.02712.33
5.1.00.0030.06012.33
5.0.50.0030.04712.33
5.0.40.0030.04012.33
5.0.30.0070.06312.33
5.0.20.0100.02712.33
5.0.10.0030.04312.33
5.0.00.0030.06312.33
4.4.90.0030.01712.33
4.4.80.0000.03012.33
4.4.70.0070.03012.33
4.4.60.0070.03712.33
4.4.50.0030.03712.33
4.4.40.0000.05712.33
4.4.30.0030.03012.33
4.4.20.0000.01712.33
4.4.10.0030.02712.33
4.4.00.0000.05012.33
4.3.110.0030.02012.33
4.3.100.0030.03312.33
4.3.90.0000.02312.33
4.3.80.0000.05712.33
4.3.70.0000.03312.33
4.3.60.0030.03312.33
4.3.50.0030.03312.33
4.3.40.0100.02012.33
4.3.30.0000.04012.33
4.3.20.0000.03312.33
4.3.10.0030.02012.33
4.3.00.0030.03012.33

preferences:
93.19 ms | 400 KiB | 5 Q