3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ciao() { $out = '<pre>'; $args = func_get_args(); if(!empty($args)) { // var_export() causes fatal errors on recursion... ob_start(); ini_set('xdebug.var_display_max_depth', 4); var_dump($args); $out .= ob_get_contents()."\n\n"; ob_end_clean(); } $out .= get_backtrace(1); die($out); } class A { function B() { while (ob_get_level() > 1) ob_end_flush(); // store possible trailing content $content = ob_get_clean(); // start an output buffer which cannot be flushed (3rd parameter is false) // callback function get all output and corrects Content-Length header ob_start(function($buffer) { ciao($buffer); }, 0, false); } } $a = new A; $a->B();

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.70.0040.01118.56
8.3.60.0110.00716.88
8.3.50.0120.00421.11
8.3.40.0100.00718.71
8.3.30.0100.00718.92
8.3.20.0040.00420.25
8.3.10.0040.00421.90
8.3.00.0090.00019.38
8.2.180.0090.00618.05
8.2.170.0150.00022.96
8.2.160.0120.00320.48
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00526.16
8.2.120.0030.00522.08
8.2.110.0030.00722.30
8.2.100.0000.01217.72
8.2.90.0040.00419.08
8.2.80.0060.00317.97
8.2.70.0000.00917.38
8.2.60.0000.00817.80
8.2.50.0070.00418.07
8.2.40.0050.00319.94
8.2.30.0000.00718.13
8.2.20.0020.00517.76
8.2.10.0050.00318.04
8.2.00.0060.00517.74
8.1.280.0040.01525.92
8.1.270.0030.00523.82
8.1.260.0070.00026.35
8.1.250.0090.00028.09
8.1.240.0050.00523.88
8.1.230.0060.00619.01
8.1.220.0000.00817.80
8.1.210.0030.00518.77
8.1.200.0040.00417.25
8.1.190.0030.00517.53
8.1.180.0030.00918.10
8.1.170.0040.00418.65
8.1.160.0040.00421.93
8.1.150.0000.00718.56
8.1.140.0040.00417.42
8.1.130.0030.00317.91
8.1.120.0040.00417.50
8.1.110.0000.00817.53
8.1.100.0050.00217.50
8.1.90.0040.00417.37
8.1.80.0040.00417.45
8.1.70.0070.00017.41
8.1.60.0050.00317.59
8.1.50.0040.00417.48
8.1.40.0000.00817.55
8.1.30.0030.00517.65
8.1.20.0000.00817.72
8.1.10.0060.00317.56
8.1.00.0040.00417.34
8.0.300.0020.00520.61
8.0.290.0070.00017.18
8.0.280.0000.00818.36
8.0.270.0040.00417.21
8.0.260.0040.00417.25
8.0.250.0030.00317.03
8.0.240.0000.00716.85
8.0.230.0000.00717.04
8.0.220.0000.00716.87
8.0.210.0000.00716.84
8.0.200.0070.00016.91
8.0.190.0040.00417.01
8.0.180.0070.00416.86
8.0.170.0040.00416.87
8.0.160.0030.00316.85
8.0.150.0000.00716.88
8.0.140.0020.00516.91
8.0.130.0050.00013.34
8.0.120.0070.00016.82
8.0.110.0040.00416.98
8.0.100.0000.00716.97
8.0.90.0000.00716.94
8.0.80.0110.00416.99
8.0.70.0040.00416.93
8.0.60.0000.00716.81
8.0.50.0000.00716.92
8.0.30.0140.00517.01
8.0.20.0100.00817.40
8.0.10.0070.00017.02
8.0.00.0070.01216.90
7.4.330.0000.00515.00
7.4.320.0000.00616.37
7.4.300.0040.00416.51
7.4.290.0040.00416.65
7.4.280.0070.00016.62
7.4.270.0000.00716.51
7.4.260.0060.00316.53
7.4.250.0080.00016.45
7.4.240.0020.00516.50
7.4.230.0070.00016.50
7.4.220.0210.00016.47
7.4.210.0080.00616.60
7.4.200.0040.00416.49
7.4.190.0030.00316.71
7.4.160.0030.01316.55
7.4.150.0100.00717.40
7.4.140.0110.00617.86
7.4.130.0090.00816.62
7.4.120.0080.00816.56
7.4.110.0030.01316.45
7.4.100.0060.01316.66
7.4.90.0100.00716.44
7.4.80.0110.00719.39
7.4.70.0070.01016.71
7.4.60.0130.00316.64
7.4.50.0080.00016.23
7.4.40.0140.00322.77
7.4.30.0080.00816.57
7.4.00.0050.01214.98
7.3.330.0000.00713.38
7.3.320.0020.00213.34
7.3.310.0070.00016.38
7.3.300.0030.00316.40
7.3.290.0100.00316.39
7.3.280.0100.00716.38
7.3.270.0090.00917.40
7.3.260.0120.01216.55
7.3.250.0080.00916.49
7.3.240.0110.00716.63
7.3.230.0070.01016.60
7.3.210.0030.01416.41
7.3.200.0140.00719.39
7.3.190.0170.00016.29
7.3.180.0160.00316.46
7.3.170.0090.00616.62
7.3.160.0150.00416.29
7.3.120.0090.00514.73
7.3.110.0030.01314.73
7.3.100.0090.00615.00
7.3.90.0000.01314.83
7.3.80.0070.00714.87
7.3.70.0040.01114.77
7.3.60.0000.01014.71
7.3.50.0090.00314.60
7.3.40.0030.01414.78
7.3.30.0040.00414.46
7.3.20.0030.00716.63
7.3.10.0090.00716.56
7.3.00.0090.00716.66
7.2.330.0120.00916.59
7.2.320.0160.00816.59
7.2.310.0070.01116.67
7.2.300.0130.01016.81
7.2.290.0040.01716.61
7.2.250.0030.01615.31
7.2.240.0100.01015.28
7.2.230.0000.01915.17
7.2.220.0060.00315.29
7.2.210.0040.01215.16
7.2.200.0090.00615.01
7.2.190.0000.00915.21
7.2.180.0030.01015.04
7.2.170.0030.01215.08
7.2.130.0080.01116.94
7.2.120.0070.00716.80
7.2.110.0050.01016.75
7.2.100.0130.00516.75
7.2.90.0100.00716.90
7.2.80.0070.00916.95
7.2.70.0080.01116.79
7.2.60.0130.00616.55
7.2.50.0100.00516.75
7.2.40.0030.01316.80
7.2.30.0080.01016.85
7.2.20.0080.00516.81
7.2.10.0050.00916.88
7.2.00.0050.00617.01
7.1.330.0090.00315.80
7.1.320.0000.01215.74
7.1.310.0030.01315.85
7.1.300.0040.01015.78
7.1.290.0070.00415.83
7.1.280.0130.00015.67
7.1.270.0080.00015.40
7.1.260.0030.01015.74
7.1.250.0060.00815.83
7.1.200.0030.01015.92
7.1.100.0000.01718.34
7.1.70.0000.00817.29
7.1.60.0100.01319.46
7.1.50.0200.01034.86
7.1.00.0000.08022.35
7.0.200.0040.00416.55
7.0.140.0070.07322.21
7.0.60.0070.04719.94
7.0.50.0130.08017.73
7.0.40.0030.09019.98
7.0.30.0400.07020.23
7.0.20.0300.08320.26
7.0.10.0000.04320.16
7.0.00.0170.07320.07
5.6.280.0030.07021.01
5.6.210.0100.04720.56
5.6.200.0130.08018.14
5.6.190.0030.04320.48
5.6.180.0300.07020.46
5.6.170.0300.05320.45
5.6.160.0070.08320.57
5.6.150.0070.04318.14
5.6.140.0100.03018.29
5.6.130.0000.08718.23
5.6.120.0030.07721.01
5.6.110.0170.06721.03
5.6.100.0130.07321.00
5.6.90.0170.07021.03
5.6.80.0100.07320.37
5.6.70.4370.04320.35
5.5.350.0130.08320.42
5.5.340.0000.07718.00
5.5.330.0070.04320.38
5.5.320.0000.08320.41
5.5.310.0200.04020.41
5.5.300.0130.07317.95
5.5.290.0030.08017.95
5.5.280.0070.03720.89
5.5.270.0170.05720.99
5.5.260.0100.03720.81
5.5.250.0130.07720.70
5.5.240.0170.07720.37
5.4.450.0870.05019.55
5.4.440.0830.05319.35
5.4.430.0300.05719.32
5.4.420.0630.00019.68
5.4.410.0130.05318.81
5.4.400.0170.06018.53
5.4.390.0130.06018.57
5.4.380.0230.04718.84
5.4.370.0000.05018.77
5.4.360.0130.04018.46
5.4.350.0050.03712.05
5.4.340.0100.04112.04
5.4.320.0090.04112.53
5.4.310.0090.03812.53
5.4.300.0030.04012.53
5.4.290.0170.07712.51
5.4.280.0170.07012.41
5.4.270.0090.06412.41
5.4.260.0090.04912.41
5.4.250.0210.09112.41
5.4.240.0120.06612.41
5.4.230.0120.06612.40
5.4.220.0120.08912.40
5.4.210.0130.05612.40
5.4.200.0100.08112.40
5.4.190.0140.08112.38
5.4.180.0140.07512.40
5.4.170.0140.06812.41
5.4.160.0120.05612.40
5.4.150.0140.05912.40
5.4.140.0120.07512.08
5.4.130.0210.07912.06
5.4.120.0160.08512.02
5.4.110.0130.07012.02
5.4.100.0120.07312.02
5.4.90.0090.07912.02
5.4.80.0170.07112.02
5.4.70.0090.06312.02
5.4.60.0120.05812.02
5.4.50.0070.06212.02
5.4.40.0090.05612.00
5.4.30.0110.07912.00
5.4.20.0130.05912.00
5.4.10.0090.06512.00
5.4.00.0120.07911.49
5.3.290.0090.03712.80
5.3.280.0150.06512.71
5.3.270.0080.05712.73
5.3.260.0090.05512.72
5.3.250.0240.08712.72
5.3.240.0060.05712.72
5.3.230.0120.05212.71
5.3.220.0100.05412.68
5.3.210.0150.06512.68
5.3.200.0070.05512.68
5.3.190.0040.06912.68
5.3.180.0070.07012.67
5.3.170.0160.06112.67
5.3.160.0190.08012.67
5.3.150.0310.10512.67
5.3.140.0070.06812.66
5.3.130.0130.05012.66
5.3.120.0100.06912.66
5.3.110.0110.07112.66
5.3.100.0120.08312.13
5.3.90.0190.07612.11
5.3.80.0180.07712.11
5.3.70.0120.08712.11
5.3.60.0160.11012.09
5.3.50.0060.05612.04
5.3.40.0210.07012.04
5.3.30.0220.09211.99
5.3.20.0190.11811.78
5.3.10.0080.05911.74
5.3.00.0180.06011.74
5.2.170.0120.0729.23
5.2.160.0090.0419.23
5.2.150.0100.0439.23
5.2.140.0130.0679.22
5.2.130.0070.0449.18
5.2.120.0070.0429.18
5.2.110.0080.0489.18
5.2.100.0200.1059.18
5.2.90.0100.0429.18
5.2.80.0090.0439.18
5.2.70.0150.0659.18
5.2.60.0180.0599.13
5.2.50.0050.0489.10
5.2.40.0080.0479.08
5.2.30.0060.0509.05
5.2.20.0080.0459.05
5.2.10.0120.0548.95
5.2.00.0070.0618.82
5.1.60.0120.0698.10
5.1.50.0090.0398.09
5.1.40.0050.0458.08
5.1.30.0050.0508.42
5.1.20.0040.0488.45
5.1.10.0100.0348.17
5.1.00.0050.0468.18
5.0.50.0190.0766.65
5.0.40.0090.0246.51
5.0.30.0070.0546.32
5.0.20.0050.0316.29
5.0.10.0100.0256.26
5.0.00.0080.0416.26
4.4.90.0250.0574.78
4.4.80.0040.0174.75
4.4.70.0020.0324.76
4.4.60.0040.0194.76
4.4.50.0050.0204.77
4.4.40.0050.0534.71
4.4.30.0060.0444.76
4.4.20.0140.0464.84
4.4.10.0020.0304.85
4.4.00.0060.0614.76
4.3.110.0040.0424.67
4.3.100.0060.0234.66
4.3.90.0050.0234.63
4.3.80.0090.0614.59
4.3.70.0100.0424.63
4.3.60.0040.0214.63
4.3.50.0070.0284.63
4.3.40.0160.0404.54
4.3.30.0040.0223.31
4.3.20.0040.0433.29
4.3.10.0150.0483.24
4.3.00.0000.0237.03

preferences:
39.74 ms | 401 KiB | 5 Q