3v4l.org

run code in 300+ PHP versions simultaneously
<?php /*{ "_id" : ObjectId("595baefce2810a6a8a94fe2d"), "user" : "1234abc", "type" : "session-started", "name" : "moja o sesja", "reference_id" : "hippo-123", "created_on" : ISODate("2017-01-01T01:01:01.123Z") }*/ class A { private static $_id = 0x10a6a8a94fe2d; private $user; private $type; private $reference_id; private $created_on; public function __construct($user, $type, $reference_id, $created_on) { $this->user = $user; $this->type = $type; $this->reference_id = $reference_id; $this->created_on = $created_on; } public function __toString() { return sprintf('{ "_id": ObjectId("595baefce28%x"), "user": "%s", "type": "%s", "name": "my %s", "reference_id": "hippo-%s", "created_on": ISODate("%s.000Z") }', ++self::$_id, $this->user, $this->type, $this->type, $this->reference_id, $this->created_on ); } } echo new A('u1', 'session_started', 11, '2017-01-01T01:01:01');

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.00316.50
8.3.50.0030.01216.35
8.3.40.0140.00318.96
8.3.30.0030.01218.70
8.3.20.0040.00420.29
8.3.10.0080.00421.91
8.3.00.0040.00419.69
8.2.180.0080.00616.75
8.2.170.0170.00322.96
8.2.160.0040.01119.14
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00719.39
8.2.120.0000.00726.35
8.2.110.0030.00622.25
8.2.100.0040.00817.84
8.2.90.0040.00419.21
8.2.80.0060.00318.05
8.2.70.0000.00817.63
8.2.60.0040.00417.93
8.2.50.0040.00418.10
8.2.40.0040.00420.42
8.2.30.0060.00319.19
8.2.20.0040.00418.00
8.2.10.0070.00018.19
8.2.00.0040.00418.00
8.1.280.0150.00325.92
8.1.270.0080.00022.01
8.1.260.0030.00626.35
8.1.250.0000.00728.09
8.1.240.0040.00422.07
8.1.230.0000.01219.16
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0000.01017.34
8.1.190.0050.00317.23
8.1.180.0040.00418.10
8.1.170.0050.00318.66
8.1.160.0040.00419.06
8.1.150.0030.00718.84
8.1.140.0030.00519.50
8.1.130.0080.00018.97
8.1.120.0030.00317.39
8.1.110.0080.00017.41
8.1.100.0000.00817.48
8.1.90.0000.00817.43
8.1.80.0040.00417.34
8.1.70.0070.00017.53
8.1.60.0040.00417.60
8.1.50.0030.00617.38
8.1.40.0080.00017.51
8.1.30.0000.00817.65
8.1.20.0030.00517.65
8.1.10.0050.00317.61
8.1.00.0040.00417.42
8.0.300.0000.00818.77
8.0.290.0030.00516.63
8.0.280.0070.00018.45
8.0.270.0070.00017.17
8.0.260.0030.00316.70
8.0.250.0000.00616.85
8.0.240.0030.00316.99
8.0.230.0100.00016.84
8.0.220.0000.00716.96
8.0.210.0050.00316.87
8.0.200.0070.00016.96
8.0.190.0040.00416.89
8.0.180.0040.00416.82
8.0.170.0050.00316.92
8.0.160.0030.00316.83
8.0.150.0070.00016.86
8.0.140.0000.00716.85
8.0.130.0000.00513.32
8.0.120.0040.00416.85
8.0.110.0000.00816.89
8.0.100.0040.00416.76
8.0.90.0040.00416.73
8.0.80.0060.00916.89
8.0.70.0030.00616.91
8.0.60.0000.00816.81
8.0.50.0000.00816.84
8.0.30.0110.00717.18
8.0.20.0110.01117.40
8.0.10.0080.00016.82
8.0.00.0160.00317.04
7.4.330.0000.00615.55
7.4.320.0030.00316.41
7.4.300.0060.00016.62
7.4.290.0040.00416.42
7.4.280.0040.00416.58
7.4.270.0030.00316.54
7.4.260.0000.00716.49
7.4.250.0070.00016.59
7.4.240.0040.00416.63
7.4.230.0000.00716.51
7.4.220.0150.00316.55
7.4.210.0060.00916.64
7.4.200.0030.00316.53
7.4.160.0090.00816.49
7.4.150.0140.00317.40
7.4.140.0070.01117.86
7.4.130.0170.00616.50
7.4.120.0070.01516.49
7.4.110.0150.00316.50
7.4.100.0000.01616.44
7.4.90.0090.00916.41
7.4.80.0090.00619.39
7.4.70.0090.00916.39
7.4.60.0100.00616.64
7.4.50.0030.01316.34
7.4.40.0070.01016.46
7.4.30.0060.01216.38
7.4.00.0100.00314.63
7.3.330.0000.00513.29
7.3.320.0030.00313.34
7.3.310.0030.00316.37
7.3.300.0070.00016.26
7.3.290.0070.00816.29
7.3.280.0090.00716.28
7.3.270.0070.01017.40
7.3.260.0030.01316.39
7.3.250.0150.01016.24
7.3.240.0090.00916.56
7.3.230.0110.00816.23
7.3.210.0070.01616.38
7.3.200.0070.01016.30
7.3.190.0080.00916.28
7.3.180.0080.00816.48
7.3.170.0030.01216.29
7.3.160.0040.01216.54
7.3.10.0060.00716.44
7.3.00.0060.00916.63
7.2.330.0110.00716.63
7.2.320.0140.01116.76
7.2.310.0070.01016.63
7.2.300.0100.00716.74
7.2.290.0090.00916.64
7.2.130.0040.01116.63
7.2.120.0120.00316.79
7.2.110.0080.00516.73
7.2.100.0070.00616.92
7.2.90.0060.00416.92
7.2.80.0020.01116.88
7.2.70.0080.00816.72
7.2.60.0080.00516.82
7.2.50.0040.01016.71
7.2.40.0030.00916.79
7.2.30.0070.00716.83
7.2.20.0070.00716.90
7.2.10.0040.00516.90
7.2.00.0070.00617.66
7.1.250.0050.00715.62
7.1.200.0100.00615.60
7.1.100.0040.00818.27
7.1.70.0030.01017.18
7.1.60.0190.00934.96
7.1.50.0140.01434.52
7.1.40.0210.00734.33
7.1.30.0180.01134.41
7.1.20.0170.01334.43
7.1.10.0070.00716.50
7.1.00.0030.01016.54
7.0.200.0040.00916.69
7.0.190.0000.01316.85
7.0.180.0030.00916.21
7.0.170.0030.01016.26
7.0.160.0070.00716.37
7.0.150.0030.01116.16
7.0.140.0070.00716.26
7.0.130.0030.01016.60
7.0.120.0000.01416.57
7.0.110.0030.01016.23
7.0.100.0050.00816.45
7.0.90.0070.00716.35
7.0.80.0040.00816.14
7.0.70.0040.00816.23
7.0.60.0060.00916.06
7.0.50.0350.01016.24
7.0.40.0070.00716.50
7.0.30.0450.00614.57
7.0.20.0070.00716.61
7.0.10.0050.01116.33
7.0.00.0110.00316.29

preferences:
36.71 ms | 401 KiB | 5 Q