3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Qihoo\Controller\Decorator; use Beahoo\Controller\Request; use Beahoo\Controller\Response; /** * 前端JSONP回调函数装饰器 * * @package Qihoo\Controller\Decorator */ class CallbackDecorator extends \Beahoo\Controller\Decorator { /** * 执行 * * @param \Beahoo\Controller\Request $request * @param \Beahoo\Controller\Response $response * * @result void */ public function execute(Request $request, Response $response) { parent::execute($request, $response); $callback = $request->getQueryArg('callback'); if ($callback && preg_match('/^[\._a-z0-9]+$/i', $callback)) { $body = $response->getBody(); if (is_array($body)) { $body = json_encode($body); } $body = "{$callback}({$body})"; $response->setBody($body); } } }

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.0040.01218.93
8.3.30.0130.00919.22
8.3.20.0080.00020.13
8.3.10.0080.00023.66
8.3.00.0070.01020.86
8.2.170.0210.00022.96
8.2.160.0090.00620.43
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0120.00626.16
8.2.120.0080.00620.82
8.2.110.0030.00621.00
8.2.100.0110.00018.03
8.2.90.0060.00319.13
8.2.80.0040.00417.97
8.2.70.0000.00917.63
8.2.60.0000.00717.80
8.2.50.0000.00818.10
8.2.40.0030.00620.03
8.2.30.0060.00318.25
8.2.20.0040.00417.82
8.2.10.0000.00717.99
8.2.00.0040.00417.64
8.1.270.0110.00722.05
8.1.260.0080.00026.35
8.1.250.0140.00428.09
8.1.240.0060.00322.66
8.1.230.0070.00417.83
8.1.220.0080.00017.74
8.1.210.0080.00018.77
8.1.200.0090.00017.35
8.1.190.0030.00617.23
8.1.180.0030.00618.10
8.1.170.0030.00518.51
8.1.160.0030.00722.03
8.1.150.0040.00418.50
8.1.140.0000.00717.36
8.1.130.0000.00717.68
8.1.120.0000.00817.33
8.1.110.0000.00717.30
8.1.100.0050.00217.45
8.1.90.0070.00017.39
8.1.80.0000.00717.27
8.1.70.0000.00717.38
8.1.60.0000.00717.37
8.1.50.0030.00617.47
8.1.40.0050.00317.45
8.1.30.0000.01017.62
8.1.20.0000.00817.45
8.1.10.0020.00517.59
8.1.00.0030.00617.46
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0070.00018.59
8.0.270.0070.00017.27
8.0.260.0000.00618.37
8.0.250.0040.00416.94
8.0.240.0030.00717.05
8.0.230.0030.00317.03
8.0.220.0050.00216.98
8.0.210.0050.00316.86
8.0.200.0040.00416.87
8.0.190.0000.00816.97
8.0.180.0050.00316.88
8.0.170.0040.00417.03
8.0.160.0000.00716.84
8.0.150.0040.00416.93
8.0.140.0000.00716.92
8.0.130.0030.00313.41
8.0.120.0000.00716.96
8.0.110.0040.00416.88
8.0.100.0030.00516.78
8.0.90.0040.00417.03
8.0.80.0080.00816.89
8.0.70.0040.00417.08
8.0.60.0030.00316.77
8.0.50.0040.00417.03
8.0.30.0110.00917.16
8.0.20.0050.01417.40
8.0.10.0050.00216.96
8.0.00.0110.00616.73
7.4.330.0000.00515.00
7.4.320.0030.00316.41
7.4.300.0060.00016.53
7.4.290.0040.00416.43
7.4.280.0000.00716.49
7.4.270.0030.00316.44
7.4.260.0070.00016.35
7.4.250.0070.00016.40
7.4.240.0040.00416.46
7.4.230.0030.00316.34
7.4.220.0070.01716.41
7.4.210.0090.01016.57
7.4.200.0070.00016.34
7.4.160.0130.01016.37
7.4.150.0090.00917.40
7.4.140.0090.01017.86
7.4.130.0100.00716.45
7.4.120.0100.00616.43
7.4.110.0090.00916.31
7.4.100.0090.00916.68
7.4.90.0070.01016.37
7.4.80.0100.01319.39
7.4.70.0150.00616.64
7.4.60.0130.00316.60
7.4.50.0030.00616.41
7.4.40.0100.00716.53
7.4.30.0130.00416.44
7.4.10.0060.01015.54
7.4.00.0070.00915.60
7.3.330.0000.00713.14
7.3.320.0000.00513.30
7.3.310.0000.00716.17
7.3.300.0060.00016.20
7.3.290.0050.00916.33
7.3.280.0070.00916.29
7.3.270.0170.00017.40
7.3.260.0160.00016.37
7.3.250.0140.00816.51
7.3.240.0060.01016.38
7.3.230.0090.01216.46
7.3.210.0090.01516.55
7.3.200.0120.00919.39
7.3.190.0060.01616.31
7.3.180.0030.01316.31
7.3.170.0070.01416.38
7.3.160.0070.01116.47
7.3.130.0090.00815.59
7.3.120.0090.00915.46
7.3.110.0060.00915.43
7.3.100.0050.01115.56
7.3.90.0070.00915.70
7.3.80.0020.00815.63
7.3.70.0050.00715.58
7.3.60.0070.00915.63
7.3.50.0090.00515.53
7.3.40.0050.01215.54
7.3.30.0050.00915.60
7.3.20.0120.00517.32
7.3.10.0040.00917.32
7.3.00.0100.00517.32
7.2.330.0050.01116.66
7.2.320.0060.01216.39
7.2.310.0110.00716.54
7.2.300.0130.00716.51
7.2.290.0170.00316.53
7.2.260.0080.01115.64
7.2.250.0090.00915.75
7.2.240.0060.01115.59
7.2.230.0050.01015.76
7.2.220.0030.01215.83
7.2.210.0090.00315.71
7.2.200.0100.00515.69
7.2.190.0060.01115.63
7.2.180.0080.00615.59
7.2.170.0110.00415.69
7.2.160.0080.00715.56
7.2.150.0050.00917.55
7.2.140.0020.00917.58
7.2.130.0080.00517.46
7.2.120.0090.00617.43
7.2.110.0080.00817.57
7.2.100.0050.00717.35
7.2.90.0020.01017.48
7.2.80.0090.00617.60
7.2.70.0050.00617.54
7.2.60.0060.00717.20
7.2.50.0050.00717.40
7.2.40.0090.00517.61
7.2.30.0100.00517.61
7.2.20.0060.00817.66
7.2.10.0080.00817.45
7.2.00.0020.01018.10
7.1.330.0070.00616.42
7.1.320.0040.01016.31
7.1.310.0090.00416.40
7.1.300.0070.00916.32
7.1.290.0020.01116.39
7.1.280.0050.00616.41
7.1.270.0080.00816.39
7.1.260.0040.00716.16
7.1.250.0050.01116.36
7.1.240.0040.00816.37
7.1.230.0040.00516.17
7.1.220.0050.00416.30
7.1.210.0070.00816.28
7.1.200.0040.00816.06
7.1.190.0070.00616.41
7.1.180.0070.00716.39
7.1.170.0030.00916.29
7.1.160.0030.01216.41
7.1.150.0060.00816.40
7.1.140.0070.00516.31
7.1.130.0050.00716.33
7.1.120.0050.00816.41
7.1.110.0030.01216.33
7.1.100.0080.00516.78
7.1.90.0050.00816.34
7.1.80.0080.00616.51
7.1.70.0060.00816.44
7.1.60.0100.00617.53
7.1.50.0080.00916.52
7.1.40.0050.00716.45
7.1.30.0070.00716.24
7.1.20.0030.00716.36
7.1.10.0070.00516.34
7.1.00.0060.02918.43
7.0.330.0080.00516.09
7.0.320.0020.00616.01
7.0.310.0030.01015.87
7.0.300.0020.01415.98
7.0.290.0090.00516.00
7.0.280.0050.01016.08
7.0.270.0050.00916.14
7.0.260.0060.00815.88
7.0.250.0050.01016.17
7.0.240.0070.00716.06
7.0.230.0060.00516.13
7.0.220.0030.00916.04
7.0.210.0050.00816.09
7.0.200.0070.00915.69
7.0.190.0060.00615.93
7.0.180.0030.00716.18
7.0.170.0080.00315.93
7.0.160.0080.00816.08
7.0.150.0020.00816.14
7.0.140.0040.02818.07
7.0.130.0080.00516.10
7.0.120.0000.01315.96
7.0.110.0080.02617.38
7.0.100.0060.03417.34
7.0.90.0050.03517.36
7.0.80.0070.02717.40
7.0.70.0060.03217.38
7.0.60.0080.02917.33
7.0.50.0090.02617.25
7.0.40.0120.02716.07
7.0.30.0070.03215.94
7.0.20.0070.03215.99
7.0.10.0080.02215.97
7.0.00.0080.02816.07
5.6.400.0050.00814.98
5.6.390.0100.00214.89
5.6.380.0100.00514.87
5.6.370.0090.00514.82
5.6.360.0060.00614.91
5.6.350.0030.01014.85
5.6.340.0100.00415.02
5.6.330.0070.00514.93
5.6.320.0100.00515.01
5.6.310.0080.00614.86
5.6.300.0060.00614.89
5.6.290.0080.00514.84
5.6.280.0060.02917.05
5.6.270.0050.00615.02
5.6.260.0050.01716.91
5.6.250.0050.03416.97
5.6.240.0080.02016.85
5.6.230.0060.02616.93
5.6.220.0070.03116.80
5.6.210.0110.02616.84
5.6.200.0050.03216.80
5.6.190.0110.02716.90
5.6.180.0050.03116.88
5.6.170.0090.02416.84
5.6.160.0070.02816.85
5.6.150.0100.02316.72
5.6.140.0070.03416.91
5.6.130.0050.03616.92
5.6.120.0080.02716.96
5.6.110.0090.03116.98
5.6.100.0110.03016.88
5.6.90.0070.03316.88
5.6.80.0050.02716.65
5.6.70.0080.02216.58
5.6.60.0040.02116.65
5.6.50.0070.01916.50
5.6.40.0060.03016.47
5.6.30.0070.03116.59
5.6.20.0120.02716.64
5.6.10.0050.02216.57
5.6.00.0020.02316.61
5.5.380.0070.02515.74
5.5.370.0040.02815.65
5.5.360.0100.01515.75
5.5.350.0070.02915.71
5.5.340.0070.03315.75
5.5.330.0040.03315.84
5.5.320.0090.03215.95
5.5.310.0070.01715.81
5.5.300.0060.02815.97
5.5.290.0030.02515.99
5.5.280.0060.01815.70
5.5.270.0060.03216.04
5.5.260.0050.02615.79
5.5.250.0100.01915.80
5.5.240.0070.02915.76
5.5.230.0110.01815.65
5.5.220.0080.02715.58
5.5.210.0050.03115.72
5.5.200.0050.03015.66
5.5.190.0080.02815.65
5.5.180.0040.02215.53
5.5.170.0050.00714.69
5.5.160.0070.02615.55
5.5.150.0070.03015.75
5.5.140.0110.01915.59
5.5.130.0040.01915.59
5.5.120.0040.01815.65
5.5.110.0100.02615.83
5.5.100.0050.03015.58
5.5.90.0030.02915.50
5.5.80.0120.02315.61
5.5.70.0070.02715.52
5.5.60.0060.03015.53
5.5.50.0040.03115.46
5.5.40.0090.02615.43
5.5.30.0110.02715.53
5.5.20.0080.02615.46
5.5.10.0110.01915.51
5.5.00.0030.03215.43
5.4.450.0030.01915.21
5.4.440.0070.02315.17
5.4.430.0060.02915.17
5.4.420.0070.01915.24
5.4.410.0020.03115.13
5.4.400.0060.02915.07
5.4.390.0080.02415.13
5.4.380.0010.01915.18
5.4.370.0040.02715.06
5.4.360.0020.02515.08
5.4.350.0070.02515.08
5.4.340.0070.03215.12
5.4.330.0060.00613.10
5.4.320.0050.02915.07
5.4.310.0060.02715.07
5.4.300.0090.02715.07
5.4.290.0050.01415.11
5.4.280.0020.01515.05
5.4.270.0060.01715.13
5.4.260.0040.01815.14
5.4.250.0050.02215.07
5.4.240.0100.02715.07
5.4.230.0040.02815.05
5.4.220.0020.02215.06
5.4.210.0050.02115.08
5.4.200.0080.02515.11
5.4.190.0030.03015.07
5.4.180.0060.02715.13
5.4.170.0020.03115.17
5.4.160.0050.02815.11
5.4.150.0040.01615.15
5.4.140.0080.02514.27
5.4.130.0050.01714.16
5.4.120.0050.02514.22
5.4.110.0070.02214.29
5.4.100.0020.02314.17
5.4.90.0060.01914.24
5.4.80.0030.02614.22
5.4.70.0020.02614.15
5.4.60.0060.02414.21
5.4.50.0070.02714.25
5.4.40.0070.02614.23
5.4.30.0040.02914.24
5.4.20.0060.02714.24
5.4.10.0040.03014.23
5.4.00.0040.02814.09
5.3.290.0060.02913.67
5.3.280.0070.01413.61
5.3.270.0040.02913.65
5.3.260.0040.01713.76
5.3.250.0030.03113.66
5.3.240.0020.02613.61
5.3.230.0030.02813.66
5.3.220.0060.02613.67
5.3.210.0040.02213.65
5.3.200.0020.03313.61
5.3.190.0050.02613.65
5.3.180.0020.02613.69
5.3.170.0040.03113.64
5.3.160.0060.02913.65
5.3.150.0070.02313.69
5.3.140.0040.02913.70
5.3.130.0030.02813.65
5.3.120.0040.03013.60
5.3.110.0060.02813.62
5.3.100.0040.02713.43
5.3.90.0090.02513.51
5.3.80.0030.01813.48
5.3.70.0040.02913.46
5.3.60.0060.02913.43
5.3.50.0060.02713.43
5.3.40.0070.02213.41
5.3.30.0040.02813.37
5.3.20.0040.02413.36
5.3.10.0100.02213.39
5.3.00.0060.02713.31

preferences:
34.18 ms | 400 KiB | 5 Q