3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ok { public function t() { $this->replacer( '*' ); return preg_replace_callback( '/(t)/', array( $this, 'replacerx'), 'this is a simple test' ); } private function replacer( $input ) { static $cache = '-'; if ( ! is_array( $input ) ) { $cache = $input; } else { return $cache . $input[1] . $cache; } } } class buggyphp extends ok {} class buggyphptoo extends ok { public function t() { return parent::t(); } } $buggy = new buggyphp(); echo 'Result buggyphp: ' . $buggy->t(); echo "\n"; $buggy = new buggyphptoo(); echo 'Result buggyphptoo: ' . $buggy->t(); echo "\n"; $a = new ok(); echo 'Result ok: ' . $a->t();

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.0140.00718.68
8.3.50.0120.00521.08
8.3.40.0040.01118.98
8.3.30.0140.00018.93
8.3.20.0040.00418.60
8.3.10.0080.00020.52
8.3.00.0070.00023.61
8.2.180.0120.00916.74
8.2.170.0110.00722.96
8.2.160.0100.00720.35
8.2.150.0000.00824.18
8.2.140.0030.00624.66
8.2.130.0080.00026.16
8.2.120.0000.00819.48
8.2.110.0040.00420.52
8.2.100.0040.00718.03
8.2.90.0040.00419.17
8.2.80.0040.00418.04
8.2.70.0000.00817.50
8.2.60.0030.00618.04
8.2.50.0060.00318.07
8.2.40.0070.00318.16
8.2.30.0050.00319.83
8.2.20.0000.00817.71
8.2.10.0000.00817.76
8.2.00.0050.00317.68
8.1.280.0130.00725.92
8.1.270.0040.00423.99
8.1.260.0100.00726.35
8.1.250.0040.00428.09
8.1.240.0100.00022.52
8.1.230.0080.00321.00
8.1.220.0040.00418.77
8.1.210.0050.00318.94
8.1.200.0060.00317.35
8.1.190.0000.00817.55
8.1.180.0030.00618.10
8.1.170.0050.00318.68
8.1.160.0000.00718.92
8.1.150.0040.00418.57
8.1.140.0060.00317.50
8.1.130.0040.00417.76
8.1.120.0040.00417.53
8.1.110.0000.00817.46
8.1.100.0000.00817.51
8.1.90.0000.00717.48
8.1.80.0000.00717.47
8.1.70.0040.00417.49
8.1.60.0040.00417.49
8.1.50.0030.00517.49
8.1.40.0000.00717.55
8.1.30.0030.00617.56
8.1.20.0030.00517.59
8.1.10.0050.00317.47
8.1.00.0030.00517.41
8.0.300.0030.00520.02
8.0.290.0000.00717.18
8.0.280.0030.00318.46
8.0.270.0050.00217.20
8.0.260.0030.00316.82
8.0.250.0000.00717.01
8.0.240.0000.00916.92
8.0.230.0060.00016.91
8.0.220.0070.00016.99
8.0.210.0030.00316.96
8.0.200.0070.00017.06
8.0.190.0070.00017.06
8.0.180.0040.00416.97
8.0.170.0000.00717.00
8.0.160.0030.00317.05
8.0.150.0000.00816.88
8.0.140.0050.00516.92
8.0.130.0000.00613.36
8.0.120.0070.00016.90
8.0.110.0050.00316.84
8.0.100.0080.00017.00
8.0.90.0080.00017.02
8.0.80.0060.00916.99
8.0.70.0050.00216.95
8.0.60.0080.00016.89
8.0.50.0040.00417.00
8.0.30.0110.00717.11
8.0.20.0170.00217.45
8.0.10.0070.00017.10
8.0.00.0150.00816.92
7.4.330.0000.00714.65
7.4.320.0060.00016.61
7.4.300.0060.00016.61
7.4.290.0070.00016.54
7.4.280.0040.00416.62
7.4.270.0070.00016.55
7.4.260.0030.00313.27
7.4.250.0040.00416.60
7.4.240.0030.00316.62
7.4.230.0070.00016.39
7.4.220.0060.01316.55
7.4.210.0040.01116.54
7.4.200.0050.00216.26
7.4.190.0000.00716.68
7.4.160.0060.00916.37
7.4.150.0160.00717.40
7.4.140.0080.01017.86
7.4.130.0070.01216.55
7.4.120.0100.00716.57
7.4.110.0000.01716.66
7.4.100.0090.00916.49
7.4.90.0090.00916.55
7.4.80.0090.00919.37
7.4.70.0080.00816.66
7.4.60.0090.00916.40
7.4.50.0000.00916.53
7.4.40.0040.01222.27
7.4.30.0070.01416.39
7.4.10.0030.01315.02
7.4.00.0090.00615.07
7.3.330.0020.00213.38
7.3.320.0000.00513.29
7.3.310.0070.00016.32
7.3.300.0000.00716.41
7.3.290.0080.01116.40
7.3.280.0110.00516.45
7.3.270.0000.01717.40
7.3.260.0090.01118.24
7.3.250.0160.00616.60
7.3.240.0050.01116.36
7.3.230.0150.00316.39
7.3.210.0150.00716.50
7.3.200.0070.01019.39
7.3.190.0100.00616.60
7.3.180.0090.01216.36
7.3.170.0090.01216.68
7.3.160.0000.01516.70
7.3.130.0070.01015.13
7.3.120.0080.00814.98
7.3.110.0130.00614.98
7.3.100.0080.00814.84
7.3.90.0040.00914.63
7.3.80.0070.00714.70
7.3.70.0040.00814.95
7.3.60.0060.00314.88
7.3.50.0070.00314.94
7.3.40.0110.00314.86
7.3.30.0090.00014.97
7.3.20.0040.00716.68
7.3.10.0000.01316.58
7.3.00.0090.00616.55
7.2.330.0120.00916.81
7.2.320.0050.01416.79
7.2.310.0150.00316.81
7.2.300.0070.01116.82
7.2.290.0100.01016.83
7.2.260.0110.00715.19
7.2.250.0090.00815.32
7.2.240.0090.00615.15
7.2.230.0030.01015.06
7.2.220.0060.00314.99
7.2.210.0110.00315.04
7.2.200.0040.01214.98
7.2.190.0030.00715.18
7.2.180.0070.00715.18
7.2.170.0040.01115.15
7.2.160.0040.00815.18
7.2.150.0030.00616.77
7.2.140.0070.00716.98
7.2.130.0030.00916.71
7.2.120.0040.00816.95
7.2.110.0040.01216.75
7.2.100.0090.00616.99
7.2.90.0060.01016.95
7.2.80.0070.00717.03
7.2.70.0100.01016.71
7.2.60.0070.01116.94
7.2.50.0000.01616.98
7.2.40.0080.00816.94
7.2.30.0030.01316.82
7.2.20.0100.00717.17
7.2.10.0060.00616.97
7.2.00.0040.00918.21
7.1.330.0030.01015.75
7.1.320.0030.01115.78
7.1.310.0030.01015.92
7.1.300.0060.00315.74
7.1.290.0030.00615.48
7.1.280.0000.00915.79
7.1.270.0030.00715.74
7.1.260.0060.00916.02
7.1.250.0130.00315.77
7.1.240.0000.01215.86
7.1.230.0040.01115.66
7.1.220.0000.01315.76
7.1.210.0030.01315.62
7.1.200.0030.01015.77
7.1.190.0060.01215.57
7.1.180.0030.01615.80
7.1.170.0090.00315.77
7.1.160.0030.01015.80
7.1.150.0030.00615.82
7.1.140.0000.01615.53
7.1.130.0090.00815.73
7.1.120.0060.00315.83
7.1.110.0050.00315.51
7.1.100.0050.00916.90
7.1.90.0070.00715.77
7.1.80.0110.00415.60
7.1.70.0060.00416.43
7.1.60.0050.01417.57
7.1.50.0000.01416.46
7.1.40.0060.00315.80
7.1.30.0060.00615.76
7.1.20.0060.00915.47
7.1.10.0140.00315.72
7.1.00.0070.03819.06
7.0.330.0090.00315.56
7.0.320.0030.01315.49
7.0.310.0040.01215.53
7.0.300.0100.00315.41
7.0.290.0040.01115.26
7.0.280.0080.00415.52
7.0.270.0070.00315.39
7.0.260.0050.00315.18
7.0.250.0030.00615.51
7.0.240.0030.00715.53
7.0.230.0060.00315.54
7.0.220.0030.01015.27
7.0.210.0050.00815.66
7.0.200.0040.00616.14
7.0.190.0000.01015.59
7.0.180.0060.00615.32
7.0.170.0030.01015.27
7.0.160.0040.01415.55
7.0.150.0000.01215.55
7.0.140.0070.03318.76
7.0.130.0000.01215.41
7.0.120.0030.00815.54
7.0.110.0060.00315.28
7.0.100.0000.00915.51
7.0.90.0060.00615.43
7.0.80.0030.00615.63
7.0.70.0040.00415.44
7.0.60.0080.03318.54
7.0.50.0120.03818.72
7.0.40.0060.04816.72
7.0.30.0050.04916.85
7.0.20.0120.04416.68
7.0.10.0080.04016.70
7.0.00.0030.03016.84
5.6.400.0070.00714.53
5.6.390.0060.00614.35
5.6.380.0100.00714.70
5.6.370.0030.01314.17
5.6.360.0070.00714.36
5.6.350.0040.01114.11
5.6.340.0070.00714.19
5.6.330.0030.00914.21
5.6.320.0070.00714.36
5.6.310.0100.00314.48
5.6.300.0000.01214.36
5.6.290.0040.01114.30
5.6.280.0030.04317.59
5.6.270.0060.00314.34
5.6.260.0000.01414.28
5.6.250.0030.01314.57
5.6.240.0040.01114.51
5.6.230.0070.00714.58
5.6.220.0070.00714.31
5.6.210.0060.03517.46
5.6.200.0120.04717.81
5.6.190.0080.04717.56
5.6.180.0030.04417.77
5.6.170.0100.03917.74
5.6.160.0090.03817.66
5.6.150.0070.03217.71
5.6.140.0030.02817.73
5.6.130.0080.04017.85
5.6.120.0110.03517.82
5.6.110.0090.02117.87
5.6.100.0080.02917.79
5.6.90.0070.02917.71
5.6.80.0090.03217.41
5.6.70.0100.02117.31
5.6.60.0080.02317.35
5.6.50.0100.04117.28
5.6.40.0070.02917.46
5.6.30.0060.02617.30
5.6.20.0060.02417.36
5.6.10.0100.02217.36
5.6.00.0050.03117.25
5.5.380.0030.00714.27
5.5.370.0030.00714.33
5.5.360.0060.00314.55
5.5.350.0130.03517.27
5.5.340.0080.04717.55
5.5.330.0050.04917.64
5.5.320.0130.04117.44
5.5.310.0070.04517.51
5.5.300.0050.02617.55
5.5.290.0130.02217.28
5.5.280.0050.02517.54
5.5.270.0050.02717.45
5.5.260.0130.02717.55
5.5.250.0120.03517.38
5.5.240.0070.02717.10
5.5.230.0130.02117.23
5.5.220.0110.02417.23
5.5.210.0080.02217.35
5.5.200.0110.03117.17
5.5.190.0100.02117.19
5.5.180.0110.03817.27
5.5.170.0030.00614.25
5.5.160.0070.02717.32
5.5.150.0090.03917.12
5.5.140.0070.02517.17
5.5.130.0120.02817.17
5.5.120.0130.03217.36
5.5.110.0140.03517.12
5.5.100.0130.04317.10
5.5.90.0150.02816.90
5.5.80.0080.04017.25
5.5.70.0140.03217.25
5.5.60.0120.03017.25
5.5.50.0040.04017.20
5.5.40.0000.02617.24
5.5.30.0080.02517.25
5.5.20.0070.02317.20
5.5.10.0050.02717.17
5.5.00.0070.02517.16
5.4.450.0090.03915.28
5.4.440.0140.02715.30
5.4.430.0070.02515.19
5.4.420.0070.03715.25
5.4.410.0080.03215.20
5.4.400.0070.02315.21
5.4.390.0090.02415.20
5.4.380.0050.02515.03
5.4.370.0090.01815.12
5.4.360.0100.01815.12
5.4.350.0030.03215.05
5.4.340.0090.03715.15
5.4.330.0000.01211.02
5.4.320.0050.02515.14
5.4.310.0030.02915.07
5.4.300.0070.02815.05
5.4.290.0080.03215.12
5.4.280.0120.03815.03
5.4.270.0130.03114.96
5.4.260.0140.04514.99
5.4.250.0100.03315.21
5.4.240.0080.02915.12
5.4.230.0060.03315.12
5.4.220.0080.02415.09
5.4.210.0120.03815.02
5.4.200.0060.02815.17
5.4.190.0070.03515.13
5.4.180.0050.02214.97
5.4.170.0090.01615.14
5.4.160.0090.02114.96
5.4.150.0080.02115.04
5.4.140.0030.03213.81
5.4.130.0090.02013.66
5.4.120.0030.03513.69
5.4.110.0030.02313.75
5.4.100.0050.02513.69
5.4.90.0030.02313.88
5.4.80.0050.03013.86
5.4.70.0080.03113.73
5.4.60.0070.03913.74
5.4.50.0070.01913.69
5.4.40.0070.02113.92
5.4.30.0020.02413.75
5.4.20.0070.02013.76
5.4.10.0080.03213.80
5.4.00.0050.04013.43
5.3.290.0070.02212.79
5.3.280.0090.02112.77
5.3.270.0020.02312.80
5.3.260.0060.02312.85
5.3.250.0070.02512.86
5.3.240.0070.01812.87
5.3.230.0030.02312.81
5.3.220.0070.01812.85
5.3.210.0030.03112.80
5.3.200.0070.01912.85
5.3.190.0050.02312.85
5.3.180.0120.01712.80
5.3.170.0070.03012.85
5.3.160.0060.03712.75
5.3.150.0100.02512.85
5.3.140.0060.02112.84
5.3.130.0060.02512.80
5.3.120.0060.03312.79
5.3.110.0030.02912.79
5.3.100.0070.04212.46
5.3.90.0090.02512.46
5.3.80.0070.04012.52
5.3.70.0100.04012.47
5.3.60.0100.03112.55
5.3.50.0070.03812.54
5.3.40.0020.02312.52
5.3.30.0070.03312.43
5.3.20.0000.02512.39
5.3.10.0100.02312.27
5.3.00.0070.02012.35
5.2.170.0070.05311.19
5.2.160.0070.06011.16
5.2.150.0000.06311.17
5.2.140.0070.02711.23
5.2.130.0100.03311.12
5.2.120.0030.03711.01
5.2.110.0030.04010.96
5.2.100.0030.03311.19
5.2.90.0070.03011.21
5.2.80.0000.03710.97
5.2.70.0000.03311.10
5.2.60.0030.03010.93
5.2.50.0030.04711.04
5.2.40.0070.04011.06
5.2.30.0070.06011.08
5.2.20.0030.04010.82
5.2.10.0030.02710.96
5.2.00.0000.05310.68
5.1.60.0070.03010.00
5.1.50.0030.04310.02
5.1.40.0030.04710.09
5.1.30.0000.03010.40
5.1.20.0000.03310.45
5.1.10.0070.03010.12
5.1.00.0000.0339.93
5.0.50.0000.0178.71
5.0.40.0070.0108.71
5.0.30.0000.0308.71
5.0.20.0070.0108.71
5.0.10.0030.0178.71
5.0.00.0000.0308.71
4.4.90.0030.0138.71
4.4.80.0000.0178.71
4.4.70.0000.0208.71
4.4.60.0030.0278.71
4.4.50.0000.0278.71
4.4.40.0000.0578.71
4.4.30.0030.0308.71
4.4.20.0000.0138.71
4.4.10.0000.0138.71
4.4.00.0030.0408.71
4.3.110.0000.0138.71
4.3.100.0000.0208.71
4.3.90.0000.0138.71
4.3.80.0000.0238.71
4.3.70.0030.0178.71
4.3.60.0000.0178.71
4.3.50.0000.0278.71
4.3.40.0030.0378.71
4.3.30.0000.0238.71
4.3.20.0000.0238.71
4.3.10.0070.0308.71
4.3.00.0030.0338.71

preferences:
38.93 ms | 401 KiB | 5 Q