3v4l.org

run code in 300+ PHP versions simultaneously
<?php function is_valid($string) { do { $string = str_replace(['()', '{}', '[]'], '', $string, $count); } while ($count); return (int)!$string; } $expressions = array(")(){}", "[]({})", "([])", "{()[]}", "([)]", "{()[]}{()[]}{()[]}{()[]}{()[]}"); foreach ($expressions as $expression) { echo "$expression is " , is_valid($expression) , "\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.4.130.0110.00818.80
8.4.120.0060.00324.18
8.4.110.0030.00718.84
8.4.100.0140.00618.86
8.4.90.0090.00820.78
8.4.80.0070.00718.45
8.4.70.0060.00318.00
8.4.60.0100.00818.61
8.4.50.0070.00417.54
8.4.40.0030.01319.37
8.4.30.0060.00317.66
8.4.20.0100.01020.61
8.4.10.0000.00919.34
8.3.260.0060.00216.49
8.3.250.0110.00818.79
8.3.240.0110.00716.91
8.3.230.0130.00416.63
8.3.220.0090.00719.06
8.3.210.0120.00716.74
8.3.200.0050.00316.84
8.3.190.0090.01118.80
8.3.180.0110.00618.28
8.3.170.0090.00916.68
8.3.160.0120.00616.54
8.3.150.0150.00317.02
8.3.140.0040.00416.71
8.3.130.0050.00318.62
8.3.120.0030.00618.76
8.3.110.0000.00920.94
8.3.100.0060.00324.06
8.3.90.0040.00426.77
8.3.80.0030.00918.40
8.3.70.0090.00918.31
8.3.60.0090.00918.14
8.3.50.0090.00917.50
8.3.40.0090.00918.70
8.3.30.0000.01518.57
8.3.20.0030.00618.98
8.3.10.0080.00023.61
8.3.00.0040.00420.64
8.2.290.0100.01020.34
8.2.280.0130.00618.09
8.2.270.0110.00716.59
8.2.260.0120.00620.70
8.2.250.0100.01018.32
8.2.240.0090.00017.16
8.2.230.0050.00222.58
8.2.220.0050.00537.54
8.2.210.0040.00426.77
8.2.200.0060.00316.38
8.2.190.0150.00016.58
8.2.180.0090.00918.41
8.2.170.0090.00622.96
8.2.160.0060.00922.28
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0000.00826.16
8.2.120.0000.00720.90
8.2.110.0080.00021.07
8.2.100.0080.00417.91
8.2.90.0040.00417.85
8.2.80.0030.00617.97
8.2.70.0040.00417.92
8.2.60.0080.00018.22
8.2.50.0040.00418.10
8.2.40.0090.00021.05
8.2.30.0040.00419.30
8.2.20.0050.00317.93
8.2.10.0000.00718.02
8.2.00.0040.00417.96
8.1.330.0070.01121.88
8.1.320.0120.00615.82
8.1.310.0040.00418.15
8.1.300.0040.00418.49
8.1.290.0050.00530.84
8.1.280.0110.00425.92
8.1.270.0040.00422.14
8.1.260.0030.00626.35
8.1.250.0080.00028.09
8.1.240.0060.00323.97
8.1.230.0110.00022.82
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0070.00417.35
8.1.190.0080.00017.10
8.1.180.0000.01018.10
8.1.170.0040.00418.65
8.1.160.0040.00418.88
8.1.150.0040.00418.89
8.1.140.0000.00722.08
8.1.130.0000.00920.07
8.1.120.0080.00017.39
8.1.110.0030.00517.45
8.1.100.0070.00017.34
8.1.90.0060.00317.48
8.1.80.0000.01017.33
8.1.70.0030.00317.46
8.1.60.0040.00417.62
8.1.50.0040.00417.59
8.1.40.0080.00017.54
8.1.30.0000.00817.63
8.1.20.0000.00717.67
8.1.10.0040.00417.41
8.1.00.0070.00017.43
8.0.300.0040.00421.36
8.0.290.0040.00416.75
8.0.280.0040.00418.31
8.0.270.0000.00717.29
8.0.260.0000.00718.44
8.0.250.0000.00716.94
8.0.240.0030.00316.84
8.0.230.0030.00316.99
8.0.220.0060.00316.88
8.0.210.0000.00616.95
8.0.200.0000.00716.90
8.0.190.0070.00016.86
8.0.180.0000.00816.89
8.0.170.0090.00016.92
8.0.160.0050.00216.91
8.0.150.0060.00316.86
8.0.140.0040.00416.79
8.0.130.0000.00613.36
8.0.120.0040.00416.75
8.0.110.0000.00916.73
8.0.100.0000.00716.90
8.0.90.0030.00516.91
8.0.80.0090.00716.92
8.0.70.0030.00516.71
8.0.60.0030.00516.97
8.0.50.0000.00816.88
8.0.30.0110.01117.22
8.0.20.0150.01217.47
8.0.10.0000.00717.07
8.0.00.0130.00716.76
7.4.330.0050.00015.55
7.4.320.0030.00316.41
7.4.300.0050.00216.55
7.4.290.0030.00316.55
7.4.280.0000.00816.59
7.4.270.0030.00316.64
7.4.260.0030.00316.53
7.4.250.0030.00316.56
7.4.240.0000.00716.45
7.4.230.0070.00016.41
7.4.220.0000.00716.59
7.4.210.0070.01216.67
7.4.200.0080.00016.25
7.4.160.0070.00916.48
7.4.140.0110.00817.86
7.4.130.0070.01016.56
7.4.120.0090.00916.53
7.4.110.0060.01216.46
7.4.100.0070.01016.46
7.4.90.0070.01016.34
7.4.80.0060.01119.39
7.4.70.0110.00716.50
7.4.60.0110.01116.50
7.4.50.0110.00416.59
7.4.40.0060.00916.46
7.4.10.0070.01014.68
7.4.00.0080.00914.98
7.3.330.0000.00513.37
7.3.320.0060.00013.22
7.3.310.0030.00316.35
7.3.300.0030.00316.29
7.3.290.0040.00416.29
7.3.280.0140.00216.38
7.3.260.0120.00616.43
7.3.240.0100.00916.51
7.3.230.0160.00916.39
7.3.210.0150.00316.29
7.3.200.0120.00916.38
7.3.190.0100.00616.54
7.3.180.0070.00716.54
7.3.170.0120.00616.33
7.3.160.0060.00916.53
7.3.130.0090.00914.60
7.3.120.0060.01214.63
7.3.110.0080.01014.81
7.3.100.0050.01014.80
7.3.90.0020.01114.95
7.3.80.0080.00614.75
7.3.70.0090.00414.56
7.3.60.0090.00314.76
7.3.50.0040.00714.69
7.3.40.0030.00514.86
7.3.30.0130.00314.82
7.3.20.0050.00916.70
7.3.10.0080.00516.67
7.3.00.0050.00816.60
7.2.330.0060.01216.63
7.2.320.0130.00616.64
7.2.310.0090.00816.55
7.2.300.0070.01716.77
7.2.290.0120.00616.80
7.2.260.0060.00915.11
7.2.250.0030.01214.99
7.2.240.0050.01115.11
7.2.230.0060.01015.21
7.2.220.0050.00715.10
7.2.210.0110.00314.98
7.2.200.0020.01214.91
7.2.190.0070.00715.09
7.2.180.0060.00614.88
7.2.170.0090.00515.07
7.2.160.0120.00314.77
7.2.150.0000.00916.80
7.2.140.0050.00516.96
7.2.130.0060.00616.71
7.2.120.0100.00016.72
7.2.110.0060.00716.73
7.2.100.0040.00916.66
7.2.90.0030.01016.80
7.2.80.0050.00816.74
7.2.70.0030.01216.71
7.2.60.0080.01016.82
7.2.50.0090.00816.96
7.2.40.0060.00816.83
7.2.30.0070.00817.02
7.2.20.0080.00616.84
7.2.10.0020.01117.02
7.2.00.0090.00516.82
7.1.330.0070.00715.84
7.1.320.0050.00815.97
7.1.310.0050.00715.79
7.1.300.0030.00815.91
7.1.290.0090.00515.92
7.1.280.0030.00815.91
7.1.270.0030.00615.71
7.1.260.0030.00715.85
7.1.250.0060.00315.86
7.1.240.0040.00715.80
7.1.230.0050.00815.73
7.1.220.0040.00815.68
7.1.210.0080.00315.78
7.1.200.0050.00915.74
7.1.190.0050.00915.68
7.1.180.0090.00615.84
7.1.170.0050.00815.81
7.1.160.0080.00715.82
7.1.150.0090.00615.73
7.1.140.0080.00515.82
7.1.130.0020.01215.79
7.1.120.0070.01015.95
7.1.110.0050.00715.77
7.1.100.0050.00715.64
7.1.90.0020.01215.80
7.1.80.0030.00815.80
7.1.70.0060.00615.59
7.1.60.0110.01124.73
7.1.50.0130.01024.69
7.1.40.0160.00724.78
7.1.30.0200.00324.69
7.1.20.0120.01524.84
7.1.10.0070.00615.73
7.1.00.0060.00915.77
7.0.330.0000.01515.42
7.0.320.0060.00615.17
7.0.310.0100.00015.27
7.0.300.0100.00315.16
7.0.290.0030.01215.29
7.0.280.0110.00415.29
7.0.270.0060.00615.23
7.0.260.0030.00515.05
7.0.250.0030.01015.36
7.0.240.0090.00615.20
7.0.230.0000.00815.34
7.0.220.0030.00615.55
7.0.210.0100.00315.25
7.0.200.0060.00615.31
7.0.190.0030.01315.36
7.0.180.0030.01015.39
7.0.170.0030.00615.03
7.0.160.0100.00315.36
7.0.150.0070.00715.29
7.0.140.0030.00615.46
7.0.130.0030.01015.55
7.0.120.0040.00815.26
7.0.110.0030.00715.36
7.0.100.0070.00415.14
7.0.90.0030.01015.48
7.0.80.0000.01515.27
7.0.70.0040.01115.43
7.0.60.0120.00015.23
7.0.50.0000.01015.45
7.0.40.0040.01113.45
7.0.30.0000.00813.58
7.0.20.0060.00913.48
7.0.10.0080.00413.64
7.0.00.0060.00313.48
5.6.400.0080.00414.48
5.6.390.0030.00714.34
5.6.380.0100.00114.30
5.6.370.0030.01014.32
5.6.360.0030.01014.20
5.6.350.0060.01013.94
5.6.340.0060.00914.56
5.6.330.0070.00714.13
5.6.320.0030.00614.56
5.6.310.0050.00514.62
5.6.300.0030.01214.50
5.6.290.0030.01214.38
5.6.280.0030.00614.03
5.6.270.0040.01114.36
5.6.260.0030.00614.10
5.6.250.0110.00414.46
5.6.240.0100.00014.38
5.6.230.0100.00314.48
5.6.220.0000.01514.20
5.6.210.0040.00714.36
5.6.200.0000.01514.52
5.6.190.0100.00314.05
5.6.180.0040.00814.34
5.6.170.0080.00414.20
5.6.160.0030.01014.08
5.6.150.0000.01314.14
5.6.140.0050.00314.48
5.6.130.0060.00614.29
5.6.120.0000.01014.23
5.6.110.0060.00614.23
5.6.100.0040.01114.43
5.6.90.0040.00414.31
5.6.80.0040.01113.93
5.6.70.0070.01014.34
5.6.60.0000.01414.15
5.6.50.0150.00014.05
5.6.40.0070.00714.00
5.6.30.0060.00614.07
5.6.20.0080.00014.21
5.6.10.0060.00314.25
5.6.00.0090.00614.04

preferences:
151.66 ms | 403 KiB | 5 Q