3v4l.org

run code in 300+ PHP versions simultaneously
<?php call_user_func(function(){ echo 'val_val' . PHP_EOL; $a = "xxx"; $b = $a; $c = $b; ob_start(function ($s) { return preg_replace('/^/m', " ", $s); }); xdebug_debug_zval('a', 'b', 'c'); ob_end_flush(); }); call_user_func(function(){ echo 'ref_val' . PHP_EOL; $a = "xxx"; $b = &$a; $c = $b; ob_start(function ($s) { return preg_replace('/^/m', " ", $s); }); xdebug_debug_zval('a', 'b', 'c'); ob_end_flush(); }); call_user_func(function(){ echo 'val_ref' . PHP_EOL; $a = "xxx"; $b = $a; $c = &$b; ob_start(function ($s) { return preg_replace('/^/m', " ", $s); }); xdebug_debug_zval('a', 'b', 'c'); ob_end_flush(); }); call_user_func(function(){ echo 'ref_ref' . PHP_EOL; $a = "xxx"; $b = &$a; $c = &$b; ob_start(function ($s) { return preg_replace('/^/m', " ", $s); }); xdebug_debug_zval('a', 'b', 'c'); ob_end_flush(); });

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.0090.00617.00
8.3.50.0120.00317.67
8.3.40.0110.00418.98
8.3.30.0040.01118.96
8.3.20.0090.00018.85
8.3.10.0000.00918.98
8.3.00.0070.00317.75
8.2.180.0040.01117.00
8.2.170.0040.01122.96
8.2.160.0120.00419.21
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0000.01019.19
8.2.110.0000.01119.21
8.2.100.0070.01217.84
8.2.90.0060.00319.03
8.2.80.0050.00317.97
8.2.70.0040.00417.75
8.2.60.0040.00417.93
8.2.50.0030.00518.10
8.2.40.0000.00820.43
8.2.30.0000.00717.96
8.2.20.0030.00618.04
8.2.10.0000.00818.01
8.2.00.0000.00817.95
8.1.280.0070.01125.92
8.1.270.0000.00724.66
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0060.00319.33
8.1.230.0090.00317.77
8.1.220.0040.00417.88
8.1.210.0050.00318.77
8.1.200.0040.00417.61
8.1.190.0000.00817.47
8.1.180.0000.00818.10
8.1.170.0040.00418.77
8.1.160.0030.00622.23
8.1.150.0040.00418.85
8.1.140.0000.00717.55
8.1.130.0030.00317.71
8.1.120.0030.00517.63
8.1.110.0000.00717.51
8.1.100.0070.00017.55
8.1.90.0000.00717.60
8.1.80.0040.00417.51
8.1.70.0050.00217.57
8.1.60.0050.00317.75
8.1.50.0000.00817.66
8.1.40.0000.00817.57
8.1.30.0070.00317.71
8.1.20.0090.00017.90
8.1.10.0040.00417.68
8.1.00.0060.00317.75
8.0.300.0050.00318.77
8.0.290.0060.00316.88
8.0.280.0030.00618.47
8.0.270.0030.00317.18
8.0.260.0000.00718.47
8.0.250.0000.00717.12
8.0.240.0000.00717.16
8.0.230.0030.00317.04
8.0.220.0080.00017.02
8.0.210.0000.00717.16
8.0.200.0000.00817.10
8.0.190.0040.00417.33
8.0.180.0090.00017.09
8.0.170.0030.00717.20
8.0.160.0040.00417.25
8.0.150.0080.00017.18
8.0.140.0000.00717.14
8.0.130.0030.00313.56
8.0.120.0080.00017.23
8.0.110.0040.00416.98
8.0.100.0050.00217.09
8.0.90.0030.00516.99
8.0.80.0060.00917.24
8.0.70.0000.00717.29
8.0.60.0040.00417.06
8.0.50.0040.00417.20
8.0.30.0130.01017.27
8.0.20.0030.01817.17
8.0.10.0030.00517.22
8.0.00.0100.00916.88
7.4.330.0000.00513.32
7.4.320.0000.00716.88
7.4.300.0000.00616.81
7.4.290.0040.00416.66
7.4.280.0000.00716.71
7.4.270.0040.00416.78
7.4.260.0050.00013.51
7.4.250.0050.00316.80
7.4.240.0000.00716.73
7.4.230.0000.00816.88
7.4.220.0090.00916.62
7.4.210.0060.01016.77
7.4.200.0070.00016.62
7.4.190.0050.00316.97
7.4.160.0130.01116.71
7.4.150.0100.00716.64
7.4.140.0080.01216.68
7.4.130.0100.00716.84
7.4.120.0090.00816.71
7.4.110.0070.01016.80
7.4.100.0060.01216.65
7.4.90.0110.00716.77
7.4.80.0070.01119.39
7.4.70.0100.00716.62
7.4.60.0070.01016.64
7.4.50.0000.01016.82
7.4.40.0040.01216.70
7.4.30.0120.00616.71
7.4.00.0030.01315.27
7.3.330.0060.00013.39
7.3.320.0050.00013.41
7.3.310.0030.00316.58
7.3.300.0000.00616.59
7.3.290.0070.00716.57
7.3.280.0080.01116.52
7.3.270.0060.01216.45
7.3.260.0170.00016.54
7.3.250.0090.00816.66
7.3.240.0030.01316.86
7.3.230.0090.00916.86
7.3.210.0080.00816.65
7.3.200.0100.00716.86
7.3.190.0100.00716.59
7.3.180.0140.00516.53
7.3.170.0090.01316.88
7.3.160.0090.01316.77
7.3.120.0130.00315.30
7.2.330.0070.01016.95
7.2.320.0030.01416.83
7.2.310.0130.01016.79
7.2.300.0090.01116.78
7.2.290.0130.00316.75
7.2.60.0070.00717.08
7.2.00.0000.01119.48
7.1.200.0120.00315.99
7.1.100.0130.00018.11
7.1.70.0000.00717.22
7.1.60.0040.01819.40
7.1.50.0260.01035.11
7.1.00.0000.06022.33
7.0.200.0160.00315.11
7.0.140.0070.07022.01
7.0.120.0000.08322.09
7.0.60.0130.07319.87
7.0.50.0070.08717.89
7.0.40.0270.05320.04
7.0.30.0370.05320.05
7.0.20.0430.07020.22
7.0.10.0330.05020.29
7.0.00.0370.07020.28
5.6.280.0030.07321.00
5.6.210.0000.07720.53
5.6.200.0070.08018.14
5.6.190.0400.06720.57
5.6.180.0270.04720.63
5.6.170.0470.06720.63
5.6.160.0330.06020.53
5.6.150.0300.05020.40
5.6.140.0400.06720.33
5.6.130.0400.07320.44
5.6.120.0230.05320.42
5.6.110.0270.08020.19
5.6.100.0300.07020.39
5.6.90.0230.08320.19
5.6.80.0200.04019.83
5.6.70.0230.08019.60
5.6.60.0130.06319.61
5.6.50.0430.03319.56
5.6.40.0230.07719.55
5.6.30.0270.08319.83
5.6.20.0270.04719.79
5.6.10.0200.04319.76
5.6.00.0270.07719.55
5.5.350.0330.06720.42
5.5.340.0070.08717.96
5.5.330.0270.08720.21
5.5.320.0400.06720.44
5.5.310.0430.06720.27
5.5.300.0300.06720.30
5.5.290.0300.07720.14
5.5.280.0330.07320.00
5.5.270.0270.07020.12
5.5.260.0270.06020.29
5.5.250.0200.06320.03
5.5.240.0170.04319.39
5.5.230.0230.05719.35
5.5.220.0230.06019.52
5.5.210.0370.06319.38
5.5.200.0370.04319.59
5.5.190.0300.07719.60
5.5.180.0300.05319.35
5.5.160.0230.07319.48
5.5.150.0270.04719.59
5.5.140.0300.05319.52
5.5.130.0270.08019.56
5.5.120.0370.04019.32
5.5.110.0300.06019.54
5.5.100.0300.07719.40
5.5.90.0300.08019.49
5.5.80.0370.06319.54
5.5.70.0300.08019.48
5.5.60.0300.07319.22
5.5.50.0300.07719.38
5.5.40.0430.06019.40
5.5.30.0270.04319.27
5.5.20.0230.04019.32
5.5.10.0370.06319.41
5.5.00.0230.04019.46
5.4.450.0270.06719.55
5.4.440.0300.06019.19
5.4.430.0300.03719.25
5.4.420.0330.06719.52
5.4.410.0270.06719.09
5.4.400.0200.03719.25
5.4.390.0300.03318.85
5.4.380.0370.06719.12
5.4.370.0230.04719.15
5.4.360.0330.06319.15
5.4.350.0270.06018.86
5.4.340.0330.06719.16
5.4.320.0300.06718.88
5.4.310.0230.06719.15
5.4.300.0270.07318.93
5.4.290.0370.03719.20
5.4.280.0470.04719.15
5.4.270.0400.06319.15
5.4.260.0270.07019.24
5.4.250.0270.07319.07
5.4.240.0430.05719.14
5.4.230.0300.05718.85
5.4.220.0300.05718.92
5.4.210.0370.03718.97
5.4.200.0330.05019.25
5.4.190.0330.02718.91
5.4.180.0270.05719.14
5.4.170.0270.04718.97
5.4.160.0300.07018.99
5.4.150.0270.06319.23
5.4.140.0300.04316.55
5.4.130.0330.06316.36
5.4.120.0300.07016.50
5.4.110.0170.04316.59
5.4.100.0300.07316.58
5.4.90.0230.05716.36
5.4.80.0230.04316.41
5.4.70.0330.06016.46
5.4.60.0300.07016.38
5.4.50.0330.06716.46
5.4.40.0370.06316.48
5.4.30.0270.04016.43
5.4.20.0300.07016.40
5.4.10.0330.06016.43
5.4.00.0300.06715.75
5.3.290.0370.06314.62
5.3.280.0300.07014.64
5.3.270.0300.07714.79
5.3.260.0270.04714.64
5.3.250.0370.06014.65
5.3.240.0230.04714.64
5.3.230.0300.07314.64
5.3.220.0300.07014.66
5.3.210.0300.04314.61
5.3.200.0230.04014.62
5.3.190.0270.03714.75
5.3.180.0470.05714.76
5.3.170.0230.04014.62
5.3.160.0370.05314.49
5.3.150.0400.06314.63
5.3.140.0300.04314.75
5.3.130.0270.03714.62
5.3.120.0370.05314.61
5.3.110.0300.06314.64
5.3.100.0300.06714.07
5.3.90.0330.05714.09
5.3.80.0300.04014.07
5.3.70.0200.04014.05
5.3.60.0270.07014.09
5.3.50.0270.03014.15
5.3.40.0230.06013.99
5.3.30.0270.05013.98
5.3.20.0170.05713.76
5.3.10.0200.03313.84
5.3.00.0270.03713.73
5.2.170.0200.03712.85
5.2.160.0200.04012.85
5.2.150.0270.04712.85
5.2.140.0130.05712.85
5.2.130.0230.05712.85
5.2.120.0230.02712.85
5.2.110.0200.02312.85
5.2.100.0170.02712.85
5.2.90.0170.03312.85
5.2.80.0170.02712.85
5.2.70.0170.03012.85
5.2.60.0130.03012.85
5.2.50.0200.02312.85
5.2.40.0170.02712.85
5.2.30.0130.02712.85
5.2.20.0100.03012.85
5.2.10.0170.05712.85
5.2.00.0200.03312.85
5.1.60.0100.03012.85
5.1.50.0170.04712.85
5.1.40.0200.02312.85
5.1.30.0130.03312.85
5.1.20.0100.03012.85
5.1.10.0200.02012.85
5.1.00.0130.02712.85
5.0.50.0030.02312.85
5.0.40.0030.02312.85
5.0.30.0070.03012.85
5.0.20.0070.02012.85
5.0.10.0100.01712.85
5.0.00.0100.02712.85
4.4.90.0030.01712.85
4.4.80.0030.01712.85
4.4.70.0030.02312.85
4.4.60.0070.02712.85
4.4.50.0100.01312.85
4.4.40.0130.05012.85
4.4.30.0070.02312.85
4.4.20.0100.01312.85
4.4.10.0070.01712.85
4.4.00.0070.02712.85
4.3.110.0100.01312.85
4.3.100.0070.01712.85
4.3.90.0130.01312.85
4.3.80.0030.02712.85
4.3.70.0030.01712.85
4.3.60.0070.01312.85
4.3.50.0070.01712.85
4.3.40.0070.02312.85
4.3.30.0030.01712.85
4.3.20.0030.01712.85
4.3.10.0030.01312.85
4.3.00.0070.01012.85

preferences:
42.86 ms | 401 KiB | 5 Q